diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2011-07-28 17:37:36 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-11-03 16:28:15 -0400 |
commit | 5476ea8d67b9e2b258c1c9ce6620e69bf13ecf0f (patch) | |
tree | 871b0ae7676e3886ceffd78f09b465f974388a9f /drivers/media | |
parent | 1067247f56c5a9325332148c0dea42a2aa7e718f (diff) |
[media] V4L: tw9910: remove superfluous soc-camera client operations
Now that all soc-camera hosts have been ported to use V4L2 subdevice
mediabus-config operations and soc-camera client bus-parameter operations
have been made optional, they can be removed.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/tw9910.c | 53 |
1 files changed, 3 insertions, 50 deletions
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c index 4f9fbf2ba35d..40cc1494b377 100644 --- a/drivers/media/video/tw9910.c +++ b/drivers/media/video/tw9910.c | |||
@@ -453,7 +453,7 @@ static const struct tw9910_scale_ctrl *tw9910_select_norm(struct soc_camera_devi | |||
453 | } | 453 | } |
454 | 454 | ||
455 | /* | 455 | /* |
456 | * soc_camera_ops function | 456 | * subdevice operations |
457 | */ | 457 | */ |
458 | static int tw9910_s_stream(struct v4l2_subdev *sd, int enable) | 458 | static int tw9910_s_stream(struct v4l2_subdev *sd, int enable) |
459 | { | 459 | { |
@@ -495,44 +495,6 @@ static int tw9910_s_stream(struct v4l2_subdev *sd, int enable) | |||
495 | return tw9910_power(client, enable); | 495 | return tw9910_power(client, enable); |
496 | } | 496 | } |
497 | 497 | ||
498 | static int tw9910_set_bus_param(struct soc_camera_device *icd, | ||
499 | unsigned long flags) | ||
500 | { | ||
501 | struct soc_camera_link *icl = to_soc_camera_link(icd); | ||
502 | struct v4l2_subdev *sd = soc_camera_to_subdev(icd); | ||
503 | struct i2c_client *client = v4l2_get_subdevdata(sd); | ||
504 | u8 val = VSSL_VVALID | HSSL_DVALID; | ||
505 | |||
506 | flags = soc_camera_apply_sensor_flags(icl, flags); | ||
507 | |||
508 | /* | ||
509 | * set OUTCTR1 | ||
510 | * | ||
511 | * We use VVALID and DVALID signals to control VSYNC and HSYNC | ||
512 | * outputs, in this mode their polarity is inverted. | ||
513 | */ | ||
514 | if (flags & SOCAM_HSYNC_ACTIVE_LOW) | ||
515 | val |= HSP_HI; | ||
516 | |||
517 | if (flags & SOCAM_VSYNC_ACTIVE_LOW) | ||
518 | val |= VSP_HI; | ||
519 | |||
520 | return i2c_smbus_write_byte_data(client, OUTCTR1, val); | ||
521 | } | ||
522 | |||
523 | static unsigned long tw9910_query_bus_param(struct soc_camera_device *icd) | ||
524 | { | ||
525 | struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd)); | ||
526 | struct tw9910_priv *priv = to_tw9910(client); | ||
527 | struct soc_camera_link *icl = to_soc_camera_link(icd); | ||
528 | unsigned long flags = SOCAM_PCLK_SAMPLE_RISING | SOCAM_MASTER | | ||
529 | SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_HSYNC_ACTIVE_HIGH | | ||
530 | SOCAM_VSYNC_ACTIVE_LOW | SOCAM_HSYNC_ACTIVE_LOW | | ||
531 | SOCAM_DATA_ACTIVE_HIGH | priv->info->buswidth; | ||
532 | |||
533 | return soc_camera_apply_sensor_flags(icl, flags); | ||
534 | } | ||
535 | |||
536 | static int tw9910_s_std(struct v4l2_subdev *sd, v4l2_std_id norm) | 498 | static int tw9910_s_std(struct v4l2_subdev *sd, v4l2_std_id norm) |
537 | { | 499 | { |
538 | int ret = -EINVAL; | 500 | int ret = -EINVAL; |
@@ -840,11 +802,6 @@ static int tw9910_video_probe(struct soc_camera_device *icd, | |||
840 | return 0; | 802 | return 0; |
841 | } | 803 | } |
842 | 804 | ||
843 | static struct soc_camera_ops tw9910_ops = { | ||
844 | .set_bus_param = tw9910_set_bus_param, | ||
845 | .query_bus_param = tw9910_query_bus_param, | ||
846 | }; | ||
847 | |||
848 | static struct v4l2_subdev_core_ops tw9910_subdev_core_ops = { | 805 | static struct v4l2_subdev_core_ops tw9910_subdev_core_ops = { |
849 | .g_chip_ident = tw9910_g_chip_ident, | 806 | .g_chip_ident = tw9910_g_chip_ident, |
850 | .s_std = tw9910_s_std, | 807 | .s_std = tw9910_s_std, |
@@ -964,14 +921,12 @@ static int tw9910_probe(struct i2c_client *client, | |||
964 | 921 | ||
965 | v4l2_i2c_subdev_init(&priv->subdev, client, &tw9910_subdev_ops); | 922 | v4l2_i2c_subdev_init(&priv->subdev, client, &tw9910_subdev_ops); |
966 | 923 | ||
967 | icd->ops = &tw9910_ops; | 924 | icd->ops = NULL; |
968 | icd->iface = icl->bus_id; | 925 | icd->iface = icl->bus_id; |
969 | 926 | ||
970 | ret = tw9910_video_probe(icd, client); | 927 | ret = tw9910_video_probe(icd, client); |
971 | if (ret) { | 928 | if (ret) |
972 | icd->ops = NULL; | ||
973 | kfree(priv); | 929 | kfree(priv); |
974 | } | ||
975 | 930 | ||
976 | return ret; | 931 | return ret; |
977 | } | 932 | } |
@@ -979,9 +934,7 @@ static int tw9910_probe(struct i2c_client *client, | |||
979 | static int tw9910_remove(struct i2c_client *client) | 934 | static int tw9910_remove(struct i2c_client *client) |
980 | { | 935 | { |
981 | struct tw9910_priv *priv = to_tw9910(client); | 936 | struct tw9910_priv *priv = to_tw9910(client); |
982 | struct soc_camera_device *icd = client->dev.platform_data; | ||
983 | 937 | ||
984 | icd->ops = NULL; | ||
985 | kfree(priv); | 938 | kfree(priv); |
986 | return 0; | 939 | return 0; |
987 | } | 940 | } |