]> git.baikalelectronics.ru Git - kernel.git/commit
media: ti-vpe: cal: Fix compilation on 32-bit ARM
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 23 Aug 2020 05:02:57 +0000 (07:02 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 26 Aug 2020 14:28:57 +0000 (16:28 +0200)
commit8c099dc713fb9bc39fddc94433121ec9b7977a46
tree1ab86483cff9fce147b9e18837b5b847d8efb226
parent307d1b3e26310db573de01ed3dc4a02b4fb13ada
media: ti-vpe: cal: Fix compilation on 32-bit ARM

When compiled on 32-bit ARM, the CAL driver fails with the FIELD_PREP()
macro complaining that the mask is not constant. While all callers of
the inline cal_write_field() function pass a constant mask, the mask
parameter itself is a variable, which likely doesn't please the
compiler.

Fix it by replacing FIELD_PREP() with a manual implementation.

Fixes: 4fc02ffe831d ("media: ti-vpe: cal: Turn reg_(read|write)_field() into inline functions")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reported-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/ti-vpe/cal.h