]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/media/soc_camera.h
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[net-next-2.6.git] / include / media / soc_camera.h
index 9d69f01b6fa222c4922185df44b2f6fedeed2d22..b8289c2f609b431cf6da04388bdfd679a2db65c8 100644 (file)
@@ -66,7 +66,7 @@ struct soc_camera_host_ops {
         * .get_formats() fail, .put_formats() will not be called at all, the
         * failing .get_formats() must then clean up internally.
         */
-       int (*get_formats)(struct soc_camera_device *, int,
+       int (*get_formats)(struct soc_camera_device *, unsigned int,
                           struct soc_camera_format_xlate *);
        void (*put_formats)(struct soc_camera_device *);
        int (*cropcap)(struct soc_camera_device *, struct v4l2_cropcap *);
@@ -266,8 +266,8 @@ static inline unsigned long soc_camera_bus_param_compatible(
                common_flags;
 }
 
-static inline void soc_camera_limit_side(unsigned int *start,
-               unsigned int *length, unsigned int start_min,
+static inline void soc_camera_limit_side(int *start, int *length,
+               unsigned int start_min,
                unsigned int length_min, unsigned int length_max)
 {
        if (*length < length_min)
@@ -284,4 +284,12 @@ static inline void soc_camera_limit_side(unsigned int *start,
 extern unsigned long soc_camera_apply_sensor_flags(struct soc_camera_link *icl,
                                                   unsigned long flags);
 
+/* This is only temporary here - until v4l2-subdev begins to link to video_device */
+#include <linux/i2c.h>
+static inline struct video_device *soc_camera_i2c_to_vdev(struct i2c_client *client)
+{
+       struct soc_camera_device *icd = client->dev.platform_data;
+       return icd->vdev;
+}
+
 #endif