diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2018-01-09 13:20:34 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-01-23 16:12:01 +0300 |
commit | 3580112b6d6f51725ba605c146db14af61e87628 (patch) | |
tree | 8b1aa45e1330526e66e5e047af75a4758c715f6f /include/media/media-entity.h | |
parent | 6146fde355b4eef760102a8ce0d063c6ecf53cb8 (diff) | |
download | linux-3580112b6d6f51725ba605c146db14af61e87628.tar.xz |
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 'include/media/media-entity.h')
-rw-r--r-- | include/media/media-entity.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/media/media-entity.h b/include/media/media-entity.h index d7a669058b5e..a732af1dbba0 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -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. |