summaryrefslogtreecommitdiff
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-07-06 21:36:37 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-07-19 11:37:32 +0300
commitcd2144603ad3276cb0379f5f70d85cedcc68ecb4 (patch)
treeda6d8624e57e48b2498959afe328ad531304eccc /drivers/media/platform
parent0a8e64ed2100511454d652d03f5ec9098ded5c44 (diff)
downloadlinux-cd2144603ad3276cb0379f5f70d85cedcc68ecb4.tar.xz
media: ti-vpe: cal: Inline cal_camerarx_max_lanes() in its only caller
The cal_camerarx_max_lanes() function is a one-liner that has a single caller. It doesn't improve readability. Inline it in its caller. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/ti-vpe/cal.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c
index 31878a32f6a1..4be1fa7e8197 100644
--- a/drivers/media/platform/ti-vpe/cal.c
+++ b/drivers/media/platform/ti-vpe/cal.c
@@ -481,19 +481,13 @@ static void cal_quickdump_regs(struct cal_dev *cal)
* ------------------------------------------------------------------
*/
-static u32 cal_camerarx_max_lanes(struct cal_camerarx *phy)
-{
- return phy->cal->data->camerarx[phy->instance].num_lanes;
-}
-
static void cal_camerarx_enable(struct cal_camerarx *phy)
{
- u32 max_lanes;
+ u32 num_lanes = phy->cal->data->camerarx[phy->instance].num_lanes;
regmap_field_write(phy->fields[F_CAMMODE], 0);
/* Always enable all lanes at the phy control level */
- max_lanes = (1 << cal_camerarx_max_lanes(phy)) - 1;
- regmap_field_write(phy->fields[F_LANEENABLE], max_lanes);
+ regmap_field_write(phy->fields[F_LANEENABLE], (1 << num_lanes) - 1);
/* F_CSI_MODE is not present on every architecture */
if (phy->fields[F_CSI_MODE])
regmap_field_write(phy->fields[F_CSI_MODE], 1);