media: i2c: imx219: Don't store the current mode in the imx219 structure
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 24 Sep 2023 15:33:01 +0000 (18:33 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 7 Oct 2023 08:55:47 +0000 (10:55 +0200)
commite3e5d172d5fce9151bc101427554a158d4759856
tree578f25ee1ae17ace65a26379f02c82f173c15bec
parentaa86ac42eec4dd7e987c12390a0a487187e2d9ae
media: i2c: imx219: Don't store the current mode in the imx219 structure

The mode field of the imx219 structure is only used in
imx219_init_controls(), after the probe function sets it to point to the
default mode. Use the default mode directly when initializing controls,
and drop the mode field from the imx219 structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/imx219.c