diff options
Diffstat (limited to 'drivers/media/video/v4l2-common.c')
-rw-r--r-- | drivers/media/video/v4l2-common.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 3f0871b550ad..810eef43c216 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -407,18 +407,6 @@ struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, | |||
407 | /* Decrease the module use count to match the first try_module_get. */ | 407 | /* Decrease the module use count to match the first try_module_get. */ |
408 | module_put(client->driver->driver.owner); | 408 | module_put(client->driver->driver.owner); |
409 | 409 | ||
410 | if (sd) { | ||
411 | /* We return errors from v4l2_subdev_call only if we have the | ||
412 | callback as the .s_config is not mandatory */ | ||
413 | int err = v4l2_subdev_call(sd, core, s_config, | ||
414 | info->irq, info->platform_data); | ||
415 | |||
416 | if (err && err != -ENOIOCTLCMD) { | ||
417 | v4l2_device_unregister_subdev(sd); | ||
418 | sd = NULL; | ||
419 | } | ||
420 | } | ||
421 | |||
422 | error: | 410 | error: |
423 | /* If we have a client but no subdev, then something went wrong and | 411 | /* If we have a client but no subdev, then something went wrong and |
424 | we must unregister the client. */ | 412 | we must unregister the client. */ |
@@ -428,9 +416,8 @@ error: | |||
428 | } | 416 | } |
429 | EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_board); | 417 | EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_board); |
430 | 418 | ||
431 | struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, | 419 | struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev, |
432 | struct i2c_adapter *adapter, const char *client_type, | 420 | struct i2c_adapter *adapter, const char *client_type, |
433 | int irq, void *platform_data, | ||
434 | u8 addr, const unsigned short *probe_addrs) | 421 | u8 addr, const unsigned short *probe_addrs) |
435 | { | 422 | { |
436 | struct i2c_board_info info; | 423 | struct i2c_board_info info; |
@@ -440,12 +427,10 @@ struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, | |||
440 | memset(&info, 0, sizeof(info)); | 427 | memset(&info, 0, sizeof(info)); |
441 | strlcpy(info.type, client_type, sizeof(info.type)); | 428 | strlcpy(info.type, client_type, sizeof(info.type)); |
442 | info.addr = addr; | 429 | info.addr = addr; |
443 | info.irq = irq; | ||
444 | info.platform_data = platform_data; | ||
445 | 430 | ||
446 | return v4l2_i2c_new_subdev_board(v4l2_dev, adapter, &info, probe_addrs); | 431 | return v4l2_i2c_new_subdev_board(v4l2_dev, adapter, &info, probe_addrs); |
447 | } | 432 | } |
448 | EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_cfg); | 433 | EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev); |
449 | 434 | ||
450 | /* Return i2c client address of v4l2_subdev. */ | 435 | /* Return i2c client address of v4l2_subdev. */ |
451 | unsigned short v4l2_i2c_subdev_addr(struct v4l2_subdev *sd) | 436 | unsigned short v4l2_i2c_subdev_addr(struct v4l2_subdev *sd) |