diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2018-01-09 05:20:34 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-01-23 08:12:01 -0500 |
commit | 3580112b6d6f51725ba605c146db14af61e87628 (patch) | |
tree | 8b1aa45e1330526e66e5e047af75a4758c715f6f /drivers/media/i2c/tvp514x.c | |
parent | 6146fde355b4eef760102a8ce0d063c6ecf53cb8 (diff) | |
download | lwn-3580112b6d6f51725ba605c146db14af61e87628.tar.gz lwn-3580112b6d6f51725ba605c146db14af61e87628.zip |
media: entity: Add a nop variant of media_entity_cleanup
Add nop variant of media_entity_cleanup. This allows calling
media_entity_cleanup whether or not Media controller is enabled,
simplifying driver code.
Also drop #ifdefs on a few drivers around media_entity_cleanup().
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c/tvp514x.c')
-rw-r--r-- | drivers/media/i2c/tvp514x.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c index d575b3e7e835..8b0aa9297bde 100644 --- a/drivers/media/i2c/tvp514x.c +++ b/drivers/media/i2c/tvp514x.c @@ -1131,9 +1131,7 @@ tvp514x_probe(struct i2c_client *client, const struct i2c_device_id *id) done: if (ret < 0) { v4l2_ctrl_handler_free(&decoder->hdl); -#if defined(CONFIG_MEDIA_CONTROLLER) media_entity_cleanup(&decoder->sd.entity); -#endif } return ret; } @@ -1151,9 +1149,7 @@ static int tvp514x_remove(struct i2c_client *client) struct tvp514x_decoder *decoder = to_decoder(sd); v4l2_async_unregister_subdev(&decoder->sd); -#if defined(CONFIG_MEDIA_CONTROLLER) media_entity_cleanup(&decoder->sd.entity); -#endif v4l2_ctrl_handler_free(&decoder->hdl); return 0; } |