| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | | - * Copyright (C) 2010-2013 Bluecherry, LLC <http://www.bluecherrydvr.com> |
|---|
| 3 | + * Copyright (C) 2010-2013 Bluecherry, LLC <https://www.bluecherrydvr.com> |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Original author: |
|---|
| 5 | 6 | * Ben Collins <bcollins@ubuntu.com> |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * Additional work by: |
|---|
| 8 | 9 | * John Brooks <john.brooks@bluecherry.net> |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 11 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 12 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 13 | | - * (at your option) any later version. |
|---|
| 14 | | - * |
|---|
| 15 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 16 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 17 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 18 | | - * GNU General Public License for more details. |
|---|
| 19 | 10 | */ |
|---|
| 20 | 11 | |
|---|
| 21 | 12 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 383 | 374 | { |
|---|
| 384 | 375 | struct solo_dev *solo_dev = video_drvdata(file); |
|---|
| 385 | 376 | |
|---|
| 386 | | - strcpy(cap->driver, SOLO6X10_NAME); |
|---|
| 387 | | - strcpy(cap->card, "Softlogic 6x10"); |
|---|
| 377 | + strscpy(cap->driver, SOLO6X10_NAME, sizeof(cap->driver)); |
|---|
| 378 | + strscpy(cap->card, "Softlogic 6x10", sizeof(cap->card)); |
|---|
| 388 | 379 | snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s", |
|---|
| 389 | 380 | pci_name(solo_dev->pdev)); |
|---|
| 390 | | - cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | |
|---|
| 391 | | - V4L2_CAP_READWRITE | V4L2_CAP_STREAMING; |
|---|
| 392 | | - cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; |
|---|
| 393 | 381 | return 0; |
|---|
| 394 | 382 | } |
|---|
| 395 | 383 | |
|---|
| .. | .. |
|---|
| 470 | 458 | return -EINVAL; |
|---|
| 471 | 459 | |
|---|
| 472 | 460 | f->pixelformat = V4L2_PIX_FMT_UYVY; |
|---|
| 473 | | - strlcpy(f->description, "UYUV 4:2:2 Packed", sizeof(f->description)); |
|---|
| 474 | | - |
|---|
| 475 | 461 | return 0; |
|---|
| 476 | 462 | } |
|---|
| 477 | 463 | |
|---|
| .. | .. |
|---|
| 491 | 477 | pix->field = V4L2_FIELD_INTERLACED; |
|---|
| 492 | 478 | pix->pixelformat = V4L2_PIX_FMT_UYVY; |
|---|
| 493 | 479 | pix->colorspace = V4L2_COLORSPACE_SMPTE170M; |
|---|
| 494 | | - pix->priv = 0; |
|---|
| 495 | 480 | return 0; |
|---|
| 496 | 481 | } |
|---|
| 497 | 482 | |
|---|
| .. | .. |
|---|
| 521 | 506 | pix->sizeimage = solo_image_size(solo_dev); |
|---|
| 522 | 507 | pix->colorspace = V4L2_COLORSPACE_SMPTE170M; |
|---|
| 523 | 508 | pix->bytesperline = solo_bytesperline(solo_dev); |
|---|
| 524 | | - pix->priv = 0; |
|---|
| 525 | 509 | |
|---|
| 526 | 510 | return 0; |
|---|
| 527 | 511 | } |
|---|
| .. | .. |
|---|
| 637 | 621 | .minor = -1, |
|---|
| 638 | 622 | .release = video_device_release, |
|---|
| 639 | 623 | .tvnorms = V4L2_STD_NTSC_M | V4L2_STD_PAL, |
|---|
| 624 | + .device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | |
|---|
| 625 | + V4L2_CAP_STREAMING, |
|---|
| 640 | 626 | }; |
|---|
| 641 | 627 | |
|---|
| 642 | 628 | static const struct v4l2_ctrl_ops solo_ctrl_ops = { |
|---|
| .. | .. |
|---|
| 706 | 692 | while (erase_off(solo_dev)) |
|---|
| 707 | 693 | /* Do nothing */; |
|---|
| 708 | 694 | |
|---|
| 709 | | - ret = video_register_device(solo_dev->vfd, VFL_TYPE_GRABBER, nr); |
|---|
| 695 | + ret = video_register_device(solo_dev->vfd, VFL_TYPE_VIDEO, nr); |
|---|
| 710 | 696 | if (ret < 0) |
|---|
| 711 | 697 | goto fail; |
|---|
| 712 | 698 | |
|---|