aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-03-12 18:03:20 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-25 08:26:07 -0300
commit20c5f4925e96719eb83a4f15765a6e653d24bfde (patch)
tree34f47b46df9c161050559aacdfa3f61525c7f0e7 /drivers/staging/media
parentdcae5dacbce518513abf7776cb450b7bd95d722b (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>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r--drivers/staging/media/solo6x10/solo6x10.h11
-rw-r--r--drivers/staging/media/solo6x10/v4l2-enc.c9
-rw-r--r--drivers/staging/media/solo6x10/v4l2.c9
3 files changed, 9 insertions, 20 deletions
diff --git a/drivers/staging/media/solo6x10/solo6x10.h b/drivers/staging/media/solo6x10/solo6x10.h
index a75d9395b7b..d8d61deb723 100644
--- a/drivers/staging/media/solo6x10/solo6x10.h
+++ b/drivers/staging/media/solo6x10/solo6x10.h
@@ -71,16 +71,7 @@
#define SOLO_MAX_CHANNELS 16
-/* Make sure these two match */
-#define SOLO6X10_VER_MAJOR 2
-#define SOLO6X10_VER_MINOR 4
-#define SOLO6X10_VER_SUB 4
-#define SOLO6X10_VER_NUM \
- KERNEL_VERSION(SOLO6X10_VER_MAJOR, SOLO6X10_VER_MINOR, SOLO6X10_VER_SUB)
-#define SOLO6X10_VERSION \
- __stringify(SOLO6X10_VER_MAJOR) "." \
- __stringify(SOLO6X10_VER_MINOR) "." \
- __stringify(SOLO6X10_VER_SUB)
+#define SOLO6X10_VERSION "3.0.0"
/*
* 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 bb4d60a4c72..bb5f1b82ddc 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,
strcpy(cap->driver, SOLO6X10_NAME);
snprintf(cap->card, sizeof(cap->card), "Softlogic 6x10 Enc %d",
solo_enc->ch);
- snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI %s",
+ snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s",
pci_name(solo_dev->pdev));
- cap->version = SOLO6X10_VER_NUM;
- cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
- V4L2_CAP_READWRITE |
- V4L2_CAP_STREAMING;
+ cap->device_caps = V4L2_CAP_VIDEO_CAPTURE |
+ V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
+ cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
return 0;
}
diff --git a/drivers/staging/media/solo6x10/v4l2.c b/drivers/staging/media/solo6x10/v4l2.c
index ba603ce1f74..70da9e2187d 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,
strcpy(cap->driver, SOLO6X10_NAME);
strcpy(cap->card, "Softlogic 6x10");
- snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI %s",
+ snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s",
pci_name(solo_dev->pdev));
- cap->version = SOLO6X10_VER_NUM;
- cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
- V4L2_CAP_READWRITE |
- V4L2_CAP_STREAMING;
+ cap->device_caps = V4L2_CAP_VIDEO_CAPTURE |
+ V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
+ cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
return 0;
}