[media] smiapp: Add a macro for constructing 8-bit quirk registers

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
Sakari Ailus 2014-04-11 06:30:18 -03:00 committed by Mauro Carvalho Chehab
parent b05cd219ec
commit 125a1c0696
1 changed files with 6 additions and 0 deletions

View File

@ -56,6 +56,12 @@ struct smiapp_reg_8 {
void smiapp_replace_limit(struct smiapp_sensor *sensor,
u32 limit, u32 val);
#define SMIAPP_MK_QUIRK_REG_8(_reg, _val) \
{ \
.reg = (u16)_reg, \
.val = _val, \
}
#define smiapp_call_quirk(_sensor, _quirk, ...) \
(_sensor->minfo.quirk && \
_sensor->minfo.quirk->_quirk ? \