ov9282: Fix Smatch errors
Dave Stevenson
maintainercover ov9282: Fix Smatch errors
This serires fixes up smatch errors from the recent patches for ov9282.
Dave Stevenson (3):
media: i2c: ov9282: Fix missing documentation in structures
media: i2c: ov9282: Make common_regs_list static
media: i2c: ov9282: Add missing clk_disable_unprepare to error path
drivers/media/i2c/ov9282.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1
Dave Stevenson
maintainerPATCH 1/3 media: i2c: ov9282: Fix missing documentation in structures
Fix missing documentation entries for members of structures, as flagged by smatch.
--- drivers/media/i2c/ov9282.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/media/i2c/ov9282.c +4 -0
@@ -130,6 +130,7 @@ struct ov9282_reg_list {* @vblank_min: Minimum vertical blanking in lines * @vblank_max: Maximum vertical blanking in lines * @link_freq_idx: Link frequency index +* @crop: on-sensor cropping for this mode * @reg_list: Register list for sensor mode */ struct ov9282_mode {
@@ -152,13 +153,16 @@ struct ov9282_mode {* @pad: Media pad. Only one pad supported * @reset_gpio: Sensor reset gpio * @inclk: Sensor input clock +* @supplies: Regulator supplies for the sensor * @ctrl_handler: V4L2 control handler * @link_freq_ctrl: Pointer to link frequency control * @hblank_ctrl: Pointer to horizontal blanking control * @vblank_ctrl: Pointer to vertical blanking control * @exp_ctrl: Pointer to exposure control * @again_ctrl: Pointer to analog gain control +* @pixel_rate: Pointer to pixel rate control * @vblank: Vertical blanking in lines +* @noncontinuous_clock: Selection of CSI2 noncontinuous clock mode * @cur_mode: Pointer to current selected sensor mode * @code: Mbus code currently selected * @mutex: Mutex for serializing sensor controls
Signature · 1 line
2.34.1
Dave Stevenson
maintainerPATCH 2/3 media: i2c: ov9282: Make common_regs_list static
In reply to Dave Stevensoncommon_regs_list is only used within this file, so should be static. Make it so.
--- drivers/media/i2c/ov9282.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ov9282.c +1 -1
@@ -268,7 +268,7 @@ static const struct ov9282_reg common_regs[] = { {0x5a08, 0x84}, }; -struct ov9282_reg_list common_regs_list = { +static struct ov9282_reg_list common_regs_list = { .num_of_regs =ARRAY_SIZE (common_regs), .regs = common_regs, };
Signature · 1 line
2.34.1
Dave Stevenson
maintainerPATCH 3/3 media: i2c: ov9282: Add missing clk_disable_unprepare to error path
In reply to Dave StevensonIf ov9282_power_on failed the I2C write, it returned without releasing clocks or regulators. Fix this.
--- drivers/media/i2c/ov9282.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/media/i2c/ov9282.c +3 -1
@@ -1253,11 +1253,13 @@ static int ov9282_power_on(struct device *dev) OV9282_GATED_CLOCK : 0);if (ret) {dev_err (ov9282->dev,"fail to write MIPI_CTRL00" ); -return ret; + goto error_clk; }return 0 ; +error_clk: +clk_disable_unprepare (ov9282->inclk); error_reset:gpiod_set_value_cansleep (ov9282->reset_gpio,0 );
Signature · 1 line
2.34.1