lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 22 Mar 2019 14:38:20 +0800 From: Axel Lin <axel.lin@...ics.com> To: Mark Brown <broonie@...nel.org> Cc: Maarten ter Huurne <maarten@...ewalker.org>, Wenyou Yang <wenyou.yang@...el.com>, Zubair Lutfullah Kakakhel <Zubair.Kakakhel@...tec.com>, Beniamino Galvani <b.galvani@...il.com>, Liam Girdwood <lgirdwood@...il.com>, linux-kernel@...r.kernel.org, Axel Lin <axel.lin@...ics.com> Subject: [PATCH 2/2] regulator: act8865: Constify regulator_ops The act8865_ops and act8865_ldo_ops never need to be modified, make them const so compiler can put them to .rodata. Signed-off-by: Axel Lin <axel.lin@...ics.com> --- drivers/regulator/act8865-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c index af8f201e67d7..19d9ee2dac1f 100644 --- a/drivers/regulator/act8865-regulator.c +++ b/drivers/regulator/act8865-regulator.c @@ -226,7 +226,7 @@ static const struct regulator_linear_range act8600_sudcdc_voltage_ranges[] = { REGULATOR_LINEAR_RANGE(41400000, 248, 255, 0), }; -static struct regulator_ops act8865_ops = { +static const struct regulator_ops act8865_ops = { .list_voltage = regulator_list_voltage_linear_range, .map_voltage = regulator_map_voltage_linear_range, .get_voltage_sel = regulator_get_voltage_sel_regmap, @@ -236,7 +236,7 @@ static struct regulator_ops act8865_ops = { .is_enabled = regulator_is_enabled_regmap, }; -static struct regulator_ops act8865_ldo_ops = { +static const struct regulator_ops act8865_ldo_ops = { .enable = regulator_enable_regmap, .disable = regulator_disable_regmap, .is_enabled = regulator_is_enabled_regmap, -- 2.17.1
Powered by blists - more mailing lists