diff options
Diffstat (limited to 'drivers/media/video/v4l2-common.c')
| -rw-r--r-- | drivers/media/video/v4l2-common.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index 9294282b5add..b5eb1f3950b1 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
| @@ -368,18 +368,15 @@ EXPORT_SYMBOL_GPL(v4l2_i2c_subdev_init); | |||
| 368 | 368 | ||
| 369 | /* Load an i2c sub-device. */ | 369 | /* Load an i2c sub-device. */ |
| 370 | struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, | 370 | struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, |
| 371 | struct i2c_adapter *adapter, const char *module_name, | 371 | struct i2c_adapter *adapter, struct i2c_board_info *info, |
| 372 | struct i2c_board_info *info, const unsigned short *probe_addrs) | 372 | const unsigned short *probe_addrs) |
| 373 | { | 373 | { |
| 374 | struct v4l2_subdev *sd = NULL; | 374 | struct v4l2_subdev *sd = NULL; |
| 375 | struct i2c_client *client; | 375 | struct i2c_client *client; |
| 376 | 376 | ||
| 377 | BUG_ON(!v4l2_dev); | 377 | BUG_ON(!v4l2_dev); |
| 378 | 378 | ||
| 379 | if (module_name) | 379 | request_module(I2C_MODULE_PREFIX "%s", info->type); |
| 380 | request_module(module_name); | ||
| 381 | else | ||
| 382 | request_module(I2C_MODULE_PREFIX "%s", info->type); | ||
| 383 | 380 | ||
| 384 | /* Create the i2c client */ | 381 | /* Create the i2c client */ |
| 385 | if (info->addr == 0 && probe_addrs) | 382 | if (info->addr == 0 && probe_addrs) |
| @@ -432,8 +429,7 @@ error: | |||
| 432 | EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_board); | 429 | EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_board); |
| 433 | 430 | ||
| 434 | struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, | 431 | struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, |
| 435 | struct i2c_adapter *adapter, | 432 | struct i2c_adapter *adapter, const char *client_type, |
| 436 | const char *module_name, const char *client_type, | ||
| 437 | int irq, void *platform_data, | 433 | int irq, void *platform_data, |
| 438 | u8 addr, const unsigned short *probe_addrs) | 434 | u8 addr, const unsigned short *probe_addrs) |
| 439 | { | 435 | { |
| @@ -447,8 +443,7 @@ struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, | |||
| 447 | info.irq = irq; | 443 | info.irq = irq; |
| 448 | info.platform_data = platform_data; | 444 | info.platform_data = platform_data; |
| 449 | 445 | ||
| 450 | return v4l2_i2c_new_subdev_board(v4l2_dev, adapter, module_name, | 446 | return v4l2_i2c_new_subdev_board(v4l2_dev, adapter, &info, probe_addrs); |
| 451 | &info, probe_addrs); | ||
| 452 | } | 447 | } |
| 453 | EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_cfg); | 448 | EXPORT_SYMBOL_GPL(v4l2_i2c_new_subdev_cfg); |
| 454 | 449 | ||
