[PATCH 2/3] media: m88ds3103: make regmap_config static const

From: Link Mauve

Date: Tue Aug 04 2026 - 07:55:44 EST


This struct was previously carried over in the m88ds3103_dev struct,
even though it was used only once at probe-time.

This reduces the size of the m88ds3103_dev struct by 192 B, by putting
it in the .rodata section instead.

This regmap_config previously set lock_arg, but without either lock or
unlock callbacks this argument was unused.

Signed-off-by: Link Mauve <linkmauve@xxxxxxxxxxxx>
---
drivers/media/dvb-frontends/m88ds3103.c | 9 +++++----
drivers/media/dvb-frontends/m88ds3103_priv.h | 1 -
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/media/dvb-frontends/m88ds3103.c b/drivers/media/dvb-frontends/m88ds3103.c
index d79b88848a8c..d3a69a8ec3f6 100644
--- a/drivers/media/dvb-frontends/m88ds3103.c
+++ b/drivers/media/dvb-frontends/m88ds3103.c
@@ -2045,6 +2045,10 @@ static int m88ds3103_probe(struct i2c_client *client)
struct m88ds3103_platform_data *pdata = client->dev.platform_data;
int ret;
unsigned int utmp;
+ static const struct regmap_config regmap_config = {
+ .reg_bits = 8,
+ .val_bits = 8,
+ };

dev = kzalloc_obj(*dev);
if (!dev) {
@@ -2067,10 +2071,7 @@ static int m88ds3103_probe(struct i2c_client *client)
dev->config.lnb_en_pol = pdata->lnb_en_pol;
dev->cfg = &dev->config;
/* create regmap */
- dev->regmap_config.reg_bits = 8;
- dev->regmap_config.val_bits = 8;
- dev->regmap_config.lock_arg = dev;
- dev->regmap = devm_regmap_init_i2c(client, &dev->regmap_config);
+ dev->regmap = devm_regmap_init_i2c(client, &regmap_config);
if (IS_ERR(dev->regmap)) {
ret = PTR_ERR(dev->regmap);
goto err_kfree;
diff --git a/drivers/media/dvb-frontends/m88ds3103_priv.h b/drivers/media/dvb-frontends/m88ds3103_priv.h
index d7d16e7904da..a29ba664377b 100644
--- a/drivers/media/dvb-frontends/m88ds3103_priv.h
+++ b/drivers/media/dvb-frontends/m88ds3103_priv.h
@@ -33,7 +33,6 @@
struct m88ds3103_dev {
struct i2c_client *client;
struct i2c_client *dt_client;
- struct regmap_config regmap_config;
struct regmap *regmap;
struct m88ds3103_config config;
const struct m88ds3103_config *cfg;
--
2.55.0