On Sun Jul 26 14:45:31 2026 +0200, Link Mauve wrote:
> This one was fully static, so no need to fill it in the register
> function manually.
> 
> Signed-off-by: Link Mauve <[email protected]>
> Signed-off-by: Sakari Ailus <[email protected]>

Patch committed.

Thanks,
Sakari Ailus

 drivers/media/i2c/ov2740.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

---

diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c
index fbcbadcecebe..39003c1632ad 100644
--- a/drivers/media/i2c/ov2740.c
+++ b/drivers/media/i2c/ov2740.c
@@ -1241,11 +1241,16 @@ exit:
        return ret;
 }
 
+static const struct regmap_config regmap_config = {
+       .val_bits = 8,
+       .reg_bits = 16,
+       .disable_locking = true,
+};
+
 static int ov2740_register_nvmem(struct i2c_client *client,
                                 struct ov2740 *ov2740)
 {
        struct nvm_data *nvm;
-       struct regmap_config regmap_config = { };
        struct regmap *regmap;
        struct device *dev = ov2740->dev;
        struct nvmem_config nvmem_config = {
@@ -1266,9 +1271,6 @@ static int ov2740_register_nvmem(struct i2c_client 
*client,
        if (!nvm)
                return -ENOMEM;
 
-       regmap_config.val_bits = 8;
-       regmap_config.reg_bits = 16;
-       regmap_config.disable_locking = true;
        regmap = devm_regmap_init_i2c(client, &regmap_config);
        if (IS_ERR(regmap))
                return PTR_ERR(regmap);
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to