diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2011-01-08 05:08:02 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-01-19 08:45:30 -0500 |
commit | 3c7c9370fb645f4713e0fbbe69425d8db9b47a13 (patch) | |
tree | f7a0580c92bd37826f82aa87052b180addb25e4e /drivers/media/video/v4l2-common.c | |
parent | ecb71d262b0323981e07ce415da9b7adc917990a (diff) |
[media] v4l2-subdev: remove core.s_config and v4l2_i2c_new_subdev_cfg()
The core.s_config op was meant for legacy drivers that needed to work with old
pre-2.6.26 kernels. This is no longer relevant. Unfortunately, this op was
incorrectly called from several drivers.
Replace those occurences with proper i2c_board_info structs and call
v4l2_i2c_new_subdev_board.
After these changes v4l2_i2c_new_subdev_cfg() was no longer used, so remove
that function as well.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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) |