diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2016-08-11 12:28:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-08-24 15:49:18 -0400 |
commit | 5a08bc008d8ee9573bc84161ef864f6c9553a6b0 (patch) | |
tree | ecc331be6725bfe6cbfc942c734c7bcd271a3d96 | |
parent | fc49071766ed371268cc03b868cf97f21ad3f273 (diff) |
[media] tvp5150: use sd internal ops .registered instead .registered_async
The driver is using the struct v4l2_subdev_core_ops .registered_async
callback to register the connector entities and create the pad links
after the subdev entity has been registered with the media device.
But the .registered_async callback isn't needed since the v4l2 core
already calls the struct v4l2_subdev_internal_ops .registered callback
in v4l2_device_register_subdev(), after media_device_register_entity().
So, use the .registered() callback instead of the .registered_async()
that is going to be removed in a following patch since isn't needed.
Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/i2c/tvp5150.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index b7648fda519c..4740da39d698 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c | |||
@@ -1171,7 +1171,7 @@ static int tvp5150_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | |||
1171 | return 0; | 1171 | return 0; |
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | static int tvp5150_registered_async(struct v4l2_subdev *sd) | 1174 | static int tvp5150_registered(struct v4l2_subdev *sd) |
1175 | { | 1175 | { |
1176 | #ifdef CONFIG_MEDIA_CONTROLLER | 1176 | #ifdef CONFIG_MEDIA_CONTROLLER |
1177 | struct tvp5150 *decoder = to_tvp5150(sd); | 1177 | struct tvp5150 *decoder = to_tvp5150(sd); |
@@ -1220,7 +1220,6 @@ static const struct v4l2_subdev_core_ops tvp5150_core_ops = { | |||
1220 | .g_register = tvp5150_g_register, | 1220 | .g_register = tvp5150_g_register, |
1221 | .s_register = tvp5150_s_register, | 1221 | .s_register = tvp5150_s_register, |
1222 | #endif | 1222 | #endif |
1223 | .registered_async = tvp5150_registered_async, | ||
1224 | }; | 1223 | }; |
1225 | 1224 | ||
1226 | static const struct v4l2_subdev_tuner_ops tvp5150_tuner_ops = { | 1225 | static const struct v4l2_subdev_tuner_ops tvp5150_tuner_ops = { |
@@ -1258,6 +1257,10 @@ static const struct v4l2_subdev_ops tvp5150_ops = { | |||
1258 | .pad = &tvp5150_pad_ops, | 1257 | .pad = &tvp5150_pad_ops, |
1259 | }; | 1258 | }; |
1260 | 1259 | ||
1260 | static const struct v4l2_subdev_internal_ops tvp5150_internal_ops = { | ||
1261 | .registered = tvp5150_registered, | ||
1262 | }; | ||
1263 | |||
1261 | 1264 | ||
1262 | /**************************************************************************** | 1265 | /**************************************************************************** |
1263 | I2C Client & Driver | 1266 | I2C Client & Driver |
@@ -1471,6 +1474,7 @@ static int tvp5150_probe(struct i2c_client *c, | |||
1471 | } | 1474 | } |
1472 | 1475 | ||
1473 | v4l2_i2c_subdev_init(sd, c, &tvp5150_ops); | 1476 | v4l2_i2c_subdev_init(sd, c, &tvp5150_ops); |
1477 | sd->internal_ops = &tvp5150_internal_ops; | ||
1474 | sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; | 1478 | sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; |
1475 | 1479 | ||
1476 | #if defined(CONFIG_MEDIA_CONTROLLER) | 1480 | #if defined(CONFIG_MEDIA_CONTROLLER) |