Skip to content

Commit d22e5f9

Browse files
javiercarrascocruzbebarino
authored andcommitted
clk: cdce925: make regmap_cdce925_bus constant
This struct is only used for the regmap initialization via devm_regmap_init() (which expects a pointer to a const struct regmap_bus, as it will not modify the struct), and it is not modified after its declaration. Move regmap_cdce925_bus to a read-only section. Signed-off-by: Javier Carrasco <[email protected]> Link: https://lore.kernel.org/r/20241001-clk-cdce925-regmap_bus-const-v1-1-49fc11555b04@gmail.com Signed-off-by: Stephen Boyd <[email protected]>
1 parent af6bfa9 commit d22e5f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/clk-cdce925.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ static int cdce925_regulator_enable(struct device *dev, const char *name)
601601

602602
/* The CDCE925 uses a funky way to read/write registers. Bulk mode is
603603
* just weird, so just use the single byte mode exclusively. */
604-
static struct regmap_bus regmap_cdce925_bus = {
604+
static const struct regmap_bus regmap_cdce925_bus = {
605605
.write = cdce925_regmap_i2c_write,
606606
.read = cdce925_regmap_i2c_read,
607607
};

0 commit comments

Comments
 (0)