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>
This commit is contained in:
Sakari Ailus
2018-01-09 05:20:34 -05:00
committed by Mauro Carvalho Chehab
vanhempi 6146fde355
commit 3580112b6d
7 muutettua tiedostoa jossa 5 lisäystä ja 21 poistoa

Näytä tiedosto

@@ -1474,9 +1474,7 @@ static int ov2659_probe(struct i2c_client *client,
error:
v4l2_ctrl_handler_free(&ov2659->ctrls);
#if defined(CONFIG_MEDIA_CONTROLLER)
media_entity_cleanup(&sd->entity);
#endif
mutex_destroy(&ov2659->lock);
return ret;
}
@@ -1488,9 +1486,7 @@ static int ov2659_remove(struct i2c_client *client)
v4l2_ctrl_handler_free(&ov2659->ctrls);
v4l2_async_unregister_subdev(sd);
#if defined(CONFIG_MEDIA_CONTROLLER)
media_entity_cleanup(&sd->entity);
#endif
mutex_destroy(&ov2659->lock);
return 0;