From: Rikard Falkeborn Date: Sun, 13 Sep 2020 08:41:14 +0000 (+0200) Subject: regulator: ti-abb: Constify ti_abb_reg_ops X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2b37a18b58ed12b711591ec54c2b2a0e2068cf6e;p=linux.git regulator: ti-abb: Constify ti_abb_reg_ops The only usage of ti_abb_reg_ops is to assign its address to the ops field in the regulator_desc struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200913084114.8851-6-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown --- diff --git a/drivers/regulator/ti-abb-regulator.c b/drivers/regulator/ti-abb-regulator.c index af9abcd9c1665..3e60bff761948 100644 --- a/drivers/regulator/ti-abb-regulator.c +++ b/drivers/regulator/ti-abb-regulator.c @@ -619,7 +619,7 @@ check_abb: return 0; } -static struct regulator_ops ti_abb_reg_ops = { +static const struct regulator_ops ti_abb_reg_ops = { .list_voltage = regulator_list_voltage_table, .set_voltage_sel = ti_abb_set_voltage_sel,