From: Sakari Ailus <sakari.ailus@xxxxxx> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxx> --- drivers/media/i2c/smiapp/smiapp-quirk.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-quirk.h b/drivers/media/i2c/smiapp/smiapp-quirk.h index dac5566..209818f 100644 --- a/drivers/media/i2c/smiapp/smiapp-quirk.h +++ b/drivers/media/i2c/smiapp/smiapp-quirk.h @@ -72,9 +72,12 @@ void smiapp_replace_limit(struct smiapp_sensor *sensor, .val = _val, \ } +#define smiapp_has_quirk(sensor, _quirk) \ + ((sensor)->minfo.quirk && \ + (sensor)->minfo.quirk->_quirk) + #define smiapp_call_quirk(sensor, _quirk, ...) \ - ((sensor)->minfo.quirk && \ - (sensor)->minfo.quirk->_quirk ? \ + (smiapp_has_quirk(sensor, _quirk) ? \ (sensor)->minfo.quirk->_quirk(sensor, ##__VA_ARGS__) : 0) #define smiapp_needs_quirk(sensor, _quirk) \ -- 1.9.1 -- 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