]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit6033dd55aff5b5d66a2510a13bead20ed2214db6
treed0f07f9cd079a2a07ee21142fb6df00be78cc673
parent67607845d58add35a8f0504000c4476d10efa0a1
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