From: Laurent Pinchart Date: Wed, 6 May 2026 16:54:38 +0000 (+0300) Subject: media: mc-entity: Drop ifdef for media_entity_cleanup definition X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=aef73a9dad5c761e4a70fa171fed8e85ca1c1abd;p=thirdparty%2Fkernel%2Flinux.git media: mc-entity: Drop ifdef for media_entity_cleanup definition The media_entity_cleanup() function is defined in media-entity.h as a static inline no-op when CONFIG_MEDIA_CONTROLLER is enabled, and as a no-op macro otherwise. This complexity is unneeded. Use a static inline function in all cases. Reviewed-by: Jacopo Mondi Link: https://patch.msgid.link/20260506165438.1767378-2-laurent.pinchart@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil --- diff --git a/include/media/media-entity.h b/include/media/media-entity.h index 904f61c14dc1..d9b72cd87d52 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -729,11 +729,9 @@ int media_entity_pads_init(struct media_entity *entity, u16 num_pads, * zeroed but that has not been initialized with media_entity_pads_init() is * valid and is a no-op. */ -#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 +static inline void media_entity_cleanup(struct media_entity *entity) +{ +} /** * media_get_pad_index() - retrieves a pad index from an entity