If CONFIG_V4L2_FLASH_LED_CLASS wasn't defined, v4l2_flash_init() and v4l2_flash_release() were empty macros. This will lead to compiler warnings in form of unused variables if the variables are not used for other purposes. Instead, implement v4l2_flash_init() and v4l2_flash_release() as static inline functions. Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxx> --- include/media/v4l2-flash.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/media/v4l2-flash.h b/include/media/v4l2-flash.h index 945fa08..67a2cbf 100644 --- a/include/media/v4l2-flash.h +++ b/include/media/v4l2-flash.h @@ -138,8 +138,16 @@ struct v4l2_flash *v4l2_flash_init(struct led_classdev_flash *fled_cdev, void v4l2_flash_release(struct v4l2_flash *v4l2_flash); #else -#define v4l2_flash_init(fled_cdev, ops, config) (NULL) -#define v4l2_flash_release(v4l2_flash) +static inline struct v4l2_flash *v4l2_flash_init( + struct led_classdev_flash *fled_cdev, const struct v4l2_flash_ops *ops, + struct v4l2_flash_config *config) +{ + return NULL; +} + +static inline void v4l2_flash_release(struct v4l2_flash *v4l2_flash) +{ +} #endif /* CONFIG_V4L2_FLASH_LED_CLASS */ #endif /* _V4L2_FLASH_H */ -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html