From: Hans de Goede Date: Tue, 14 Oct 2025 17:40:25 +0000 (+0200) Subject: media: i2c: ov01a10: Remove struct ov01a10_reg_list X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4fdb4e6e05c46a2746b96811345f45c937c41c9;p=thirdparty%2Fkernel%2Flinux.git media: i2c: ov01a10: Remove struct ov01a10_reg_list After the conversion to the CCI register access helpers, struct ov01a10_reg_list is only used inside struct ov01a10_link_freq_config. Simplify things by embedding the ov01a10_reg_list members directly into struct ov01a10_link_freq_config. Signed-off-by: Hans de Goede Tested-by: Mehdi Djait # Dell XPS 9315 Reviewed-by: Mehdi Djait Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/i2c/ov01a10.c b/drivers/media/i2c/ov01a10.c index 349fd3d06df5c..1af0af00df24c 100644 --- a/drivers/media/i2c/ov01a10.c +++ b/drivers/media/i2c/ov01a10.c @@ -98,13 +98,9 @@ #define OV01A10_MEDIA_BUS_FMT MEDIA_BUS_FMT_SBGGR10_1X10 #define OV01A10_BAYER_PATTERN_SIZE 2 /* 2x2 */ -struct ov01a10_reg_list { - u32 num_of_regs; - const struct reg_sequence *regs; -}; - struct ov01a10_link_freq_config { - const struct ov01a10_reg_list reg_list; + const struct reg_sequence *regs; + int regs_len; }; static const struct reg_sequence mipi_data_rate_720mbps[] = { @@ -237,10 +233,8 @@ static const s64 link_freq_menu_items[] = { static const struct ov01a10_link_freq_config link_freq_configs[] = { { - .reg_list = { - .num_of_regs = ARRAY_SIZE(mipi_data_rate_720mbps), - .regs = mipi_data_rate_720mbps, - } + .regs = mipi_data_rate_720mbps, + .regs_len = ARRAY_SIZE(mipi_data_rate_720mbps), }, }; @@ -550,12 +544,12 @@ static int ov01a10_set_mode(struct ov01a10 *ov01a10) static int ov01a10_start_streaming(struct ov01a10 *ov01a10) { - const struct ov01a10_reg_list *reg_list; + const struct ov01a10_link_freq_config *freq_cfg; int ret; - reg_list = &link_freq_configs[ov01a10->link_freq_index].reg_list; - ret = regmap_multi_reg_write(ov01a10->regmap, reg_list->regs, - reg_list->num_of_regs); + freq_cfg = &link_freq_configs[ov01a10->link_freq_index]; + ret = regmap_multi_reg_write(ov01a10->regmap, freq_cfg->regs, + freq_cfg->regs_len); if (ret) { dev_err(ov01a10->dev, "failed to set plls\n"); return ret;