summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/exynos4-is/common.c
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-05-31 18:47:03 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-13 03:05:41 +0200
commit0f20956be654cf52a69b9071590faa9c6657b77f (patch)
tree55d65f3e7e85420e8e9c2fead847b3fb07504379 /drivers/media/platform/exynos4-is/common.c
parent[media] exynos4-is: Refactor vidioc_s_fmt, vidioc_try_fmt handlers (diff)
downloadlinux-0f20956be654cf52a69b9071590faa9c6657b77f.tar.xz
linux-0f20956be654cf52a69b9071590faa9c6657b77f.zip
[media] exynos4-is: Move __fimc_videoc_querycap() function to the common module
Move __fimc_videoc_querycap() function to the common exynos4-is-common.ko module so it don't need to be reimplemented in multiple video node drivers of the exynos4-is. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/exynos4-is/common.c')
-rw-r--r--drivers/media/platform/exynos4-is/common.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/platform/exynos4-is/common.c b/drivers/media/platform/exynos4-is/common.c
index 57f9010cee50..0ec210b4da1d 100644
--- a/drivers/media/platform/exynos4-is/common.c
+++ b/drivers/media/platform/exynos4-is/common.c
@@ -38,4 +38,16 @@ struct v4l2_subdev *fimc_find_remote_sensor(struct media_entity *entity)
}
EXPORT_SYMBOL(fimc_find_remote_sensor);
+void __fimc_vidioc_querycap(struct device *dev, struct v4l2_capability *cap,
+ unsigned int caps)
+{
+ strlcpy(cap->driver, dev->driver->name, sizeof(cap->driver));
+ strlcpy(cap->card, dev->driver->name, sizeof(cap->card));
+ snprintf(cap->bus_info, sizeof(cap->bus_info),
+ "platform:%s", dev_name(dev));
+ cap->device_caps = caps;
+ cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
+}
+EXPORT_SYMBOL(__fimc_vidioc_querycap);
+
MODULE_LICENSE("GPL");