]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/media/video/v4l2-common.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / drivers / media / video / v4l2-common.c
index b5eb1f3950b133c6ed76b5e32adc894b07fb3bdf..810eef43c216b86e153ad5b08fe8a432f2609986 100644 (file)
@@ -150,7 +150,7 @@ EXPORT_SYMBOL(v4l2_prio_check);
    struct v4l2_queryctrl and the available menu items. Note that
    menu_items may be NULL, in that case it is ignored. */
 int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl,
-               const char **menu_items)
+               const char * const *menu_items)
 {
        if (qctrl->flags & V4L2_CTRL_FLAG_DISABLED)
                return -EINVAL;
@@ -199,7 +199,7 @@ EXPORT_SYMBOL(v4l2_ctrl_query_fill);
    If menu_items is NULL, then the menu items are retrieved using
    v4l2_ctrl_get_menu. */
 int v4l2_ctrl_query_menu(struct v4l2_querymenu *qmenu, struct v4l2_queryctrl *qctrl,
-              const char **menu_items)
+              const char * const *menu_items)
 {
        int i;
 
@@ -222,7 +222,7 @@ EXPORT_SYMBOL(v4l2_ctrl_query_menu);
    Use this if there are 'holes' in the list of valid menu items. */
 int v4l2_ctrl_query_menu_valid_items(struct v4l2_querymenu *qmenu, const u32 *ids)
 {
-       const char **menu_items = v4l2_ctrl_get_menu(qmenu->id);
+       const char * const *menu_items = v4l2_ctrl_get_menu(qmenu->id);
 
        qmenu->reserved = 0;
        if (menu_items == NULL || ids == NULL)
@@ -407,18 +407,6 @@ struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev,
        /* Decrease the module use count to match the first try_module_get. */
        module_put(client->driver->driver.owner);
 
-       if (sd) {
-               /* We return errors from v4l2_subdev_call only if we have the
-                  callback as the .s_config is not mandatory */
-               int err = v4l2_subdev_call(sd, core, s_config,
-                               info->irq, info->platform_data);
-
-               if (err && err != -ENOIOCTLCMD) {
-                       v4l2_device_unregister_subdev(sd);
-                       sd = NULL;
-               }
-       }
-
 error:
        /* If we have a client but no subdev, then something went wrong and
           we must unregister the client. */
@@ -428,9 +416,8 @@ error:
 }
 EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_board);
 
-struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev,
+struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev,
                struct i2c_adapter *adapter, const char *client_type,
-               int irq, void *platform_data,
                u8 addr, const unsigned short *probe_addrs)
 {
        struct i2c_board_info info;
@@ -440,12 +427,10 @@ struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev,
        memset(&info, 0, sizeof(info));
        strlcpy(info.type, client_type, sizeof(info.type));
        info.addr = addr;
-       info.irq = irq;
-       info.platform_data = platform_data;
 
        return v4l2_i2c_new_subdev_board(v4l2_dev, adapter, &info, probe_addrs);
 }
-EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_cfg);
+EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev);
 
 /* Return i2c client address of v4l2_subdev. */
 unsigned short v4l2_i2c_subdev_addr(struct v4l2_subdev *sd)