regulator: pwm: No need to make a copy of regulator_ops per instance
authorAxel Lin <axel.lin@ingics.com>
Sat, 12 Jan 2019 04:30:13 +0000 (12:30 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 14 Jan 2019 11:46:05 +0000 (11:46 +0000)
commit638aef7a776a1a78247dbfd387481716bd40bf82
treed0f07f9cd079a2a07ee21142fb6df00be78cc673
parent08f0b14adc7c4fd5ef7ab2f4b7a62ed1b8216bbb
regulator: pwm: No need to make a copy of regulator_ops per instance

Having instance specific copy of desc is enough to support multiple
instance of pwm regulator.
The regulator_ops is never changed so no need to copy it per instance, make
pwm_regulator_voltage_table_ops and pwm_regulator_voltage_continuous_ops
const to ensure they won't be changed.
The pwm_regulator_desc is a template to be copied so also make it const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/pwm-regulator.c