mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
6146fde355
commit
3580112b6d
7 changed files with 5 additions and 21 deletions
|
|
@ -634,7 +634,11 @@ int media_entity_pads_init(struct media_entity *entity, u16 num_pads,
|
|||
* This function must be called during the cleanup phase after unregistering
|
||||
* the entity (currently, it does nothing).
|
||||
*/
|
||||
static inline void media_entity_cleanup(struct media_entity *entity) {};
|
||||
#if IS_ENABLED(CONFIG_MEDIA_CONTROLLER)
|
||||
static inline void media_entity_cleanup(struct media_entity *entity) {}
|
||||
#else
|
||||
#define media_entity_cleanup(entity) do { } while (false)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* media_create_pad_link() - creates a link between two entities.
|
||||
|
|
|
|||
Loading…
Reference in a new issue