Message ID | 1461532104-24032-6-git-send-email-ivo.g.dimitrov.75@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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) \