[media] exynos4-is: Move __fimc_videoc_querycap() function to the common module
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Fri, 31 May 2013 16:47:03 +0000 (13:47 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 13 Jun 2013 01:05:41 +0000 (22:05 -0300)
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>
drivers/media/platform/exynos4-is/common.c
drivers/media/platform/exynos4-is/common.h
drivers/media/platform/exynos4-is/fimc-core.c
drivers/media/platform/exynos4-is/fimc-core.h
drivers/media/platform/exynos4-is/fimc-m2m.c

index 57f9010cee50f543dc7876c3a4ade0506b3937bc..0ec210b4da1da053ae3e17b101b137d614d2ff14 100644 (file)
@@ -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");
index 3c398039ba286a46d14b3c15120feb4298ce9447..75b9c71d9419f8cf1553a670173eed73b795758b 100644 (file)
@@ -6,7 +6,11 @@
  * published by the Free Software Foundation.
  */
 
+#include <linux/device.h>
+#include <linux/videodev2.h>
 #include <media/media-entity.h>
 #include <media/v4l2-subdev.h>
 
 struct v4l2_subdev *fimc_find_remote_sensor(struct media_entity *entity);
+void __fimc_vidioc_querycap(struct device *dev, struct v4l2_capability *cap,
+                           unsigned int caps);
index 379a5e9d52a706921883c6a7c6078c2a2586fe1a..6489c5160ee8aa8de1332931b38e17705a7d4f71 100644 (file)
@@ -213,17 +213,6 @@ struct fimc_fmt *fimc_get_format(unsigned int index)
        return &fimc_formats[index];
 }
 
-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;
-}
-
 int fimc_check_scaler_ratio(struct fimc_ctx *ctx, int sw, int sh,
                            int dw, int dh, int rotation)
 {
index c48a79254d839ca033b9599a188c1240a7a9e8ca..349c7c01e49a81d0578ebe510fb98d8f4d811a5a 100644 (file)
@@ -619,8 +619,6 @@ static inline struct fimc_frame *ctx_get_frame(struct fimc_ctx *ctx,
 /* fimc-core.c */
 int fimc_vidioc_enum_fmt_mplane(struct file *file, void *priv,
                                struct v4l2_fmtdesc *f);
-void __fimc_vidioc_querycap(struct device *dev, struct v4l2_capability *cap,
-                                               unsigned int caps);
 int fimc_ctrls_create(struct fimc_ctx *ctx);
 void fimc_ctrls_delete(struct fimc_ctx *ctx);
 void fimc_ctrls_activate(struct fimc_ctx *ctx, bool active);
index bde1f47f7ed393652d31ef71b0633ac642cbf23a..8d33b68c76bac7d9e278785a8c914dddce602197 100644 (file)
@@ -27,6 +27,7 @@
 #include <media/videobuf2-core.h>
 #include <media/videobuf2-dma-contig.h>
 
+#include "common.h"
 #include "fimc-core.h"
 #include "fimc-reg.h"
 #include "media-dev.h"