diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-03-12 17:03:20 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-25 07:26:07 -0400 |
commit | 20c5f4925e96719eb83a4f15765a6e653d24bfde (patch) | |
tree | 34f47b46df9c161050559aacdfa3f61525c7f0e7 | |
parent | dcae5dacbce518513abf7776cb450b7bd95d722b (diff) |
[media] solo6x10: fix querycap and update driver version
Setup correct bus_info, let the v4l2 core set the version and add device_caps
support.
Also update the module version to 3.0.0 since this is a major upgrade.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/staging/media/solo6x10/solo6x10.h | 11 | ||||
-rw-r--r-- | drivers/staging/media/solo6x10/v4l2-enc.c | 9 | ||||
-rw-r--r-- | drivers/staging/media/solo6x10/v4l2.c | 9 |
3 files changed, 9 insertions, 20 deletions
diff --git a/drivers/staging/media/solo6x10/solo6x10.h b/drivers/staging/media/solo6x10/solo6x10.h index a75d9395b7b1..d8d61deb7237 100644 --- a/drivers/staging/media/solo6x10/solo6x10.h +++ b/drivers/staging/media/solo6x10/solo6x10.h | |||
@@ -71,16 +71,7 @@ | |||
71 | 71 | ||
72 | #define SOLO_MAX_CHANNELS 16 | 72 | #define SOLO_MAX_CHANNELS 16 |
73 | 73 | ||
74 | /* Make sure these two match */ | 74 | #define SOLO6X10_VERSION "3.0.0" |
75 | #define SOLO6X10_VER_MAJOR 2 | ||
76 | #define SOLO6X10_VER_MINOR 4 | ||
77 | #define SOLO6X10_VER_SUB 4 | ||
78 | #define SOLO6X10_VER_NUM \ | ||
79 | KERNEL_VERSION(SOLO6X10_VER_MAJOR, SOLO6X10_VER_MINOR, SOLO6X10_VER_SUB) | ||
80 | #define SOLO6X10_VERSION \ | ||
81 | __stringify(SOLO6X10_VER_MAJOR) "." \ | ||
82 | __stringify(SOLO6X10_VER_MINOR) "." \ | ||
83 | __stringify(SOLO6X10_VER_SUB) | ||
84 | 75 | ||
85 | /* | 76 | /* |
86 | * The SOLO6x10 actually has 8 i2c channels, but we only use 2. | 77 | * The SOLO6x10 actually has 8 i2c channels, but we only use 2. |
diff --git a/drivers/staging/media/solo6x10/v4l2-enc.c b/drivers/staging/media/solo6x10/v4l2-enc.c index bb4d60a4c723..bb5f1b82ddcd 100644 --- a/drivers/staging/media/solo6x10/v4l2-enc.c +++ b/drivers/staging/media/solo6x10/v4l2-enc.c | |||
@@ -991,12 +991,11 @@ static int solo_enc_querycap(struct file *file, void *priv, | |||
991 | strcpy(cap->driver, SOLO6X10_NAME); | 991 | strcpy(cap->driver, SOLO6X10_NAME); |
992 | snprintf(cap->card, sizeof(cap->card), "Softlogic 6x10 Enc %d", | 992 | snprintf(cap->card, sizeof(cap->card), "Softlogic 6x10 Enc %d", |
993 | solo_enc->ch); | 993 | solo_enc->ch); |
994 | snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI %s", | 994 | snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s", |
995 | pci_name(solo_dev->pdev)); | 995 | pci_name(solo_dev->pdev)); |
996 | cap->version = SOLO6X10_VER_NUM; | 996 | cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | |
997 | cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | | 997 | V4L2_CAP_READWRITE | V4L2_CAP_STREAMING; |
998 | V4L2_CAP_READWRITE | | 998 | cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; |
999 | V4L2_CAP_STREAMING; | ||
1000 | return 0; | 999 | return 0; |
1001 | } | 1000 | } |
1002 | 1001 | ||
diff --git a/drivers/staging/media/solo6x10/v4l2.c b/drivers/staging/media/solo6x10/v4l2.c index ba603ce1f746..70da9e2187d2 100644 --- a/drivers/staging/media/solo6x10/v4l2.c +++ b/drivers/staging/media/solo6x10/v4l2.c | |||
@@ -476,12 +476,11 @@ static int solo_querycap(struct file *file, void *priv, | |||
476 | 476 | ||
477 | strcpy(cap->driver, SOLO6X10_NAME); | 477 | strcpy(cap->driver, SOLO6X10_NAME); |
478 | strcpy(cap->card, "Softlogic 6x10"); | 478 | strcpy(cap->card, "Softlogic 6x10"); |
479 | snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI %s", | 479 | snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s", |
480 | pci_name(solo_dev->pdev)); | 480 | pci_name(solo_dev->pdev)); |
481 | cap->version = SOLO6X10_VER_NUM; | 481 | cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | |
482 | cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | | 482 | V4L2_CAP_READWRITE | V4L2_CAP_STREAMING; |
483 | V4L2_CAP_READWRITE | | 483 | cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; |
484 | V4L2_CAP_STREAMING; | ||
485 | return 0; | 484 | return 0; |
486 | } | 485 | } |
487 | 486 | ||