]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
regulator: Mark supply_name const and duplicate it as such
authorStephen Boyd <sboyd@codeaurora.org>
Fri, 17 Mar 2017 01:07:14 +0000 (18:07 -0700)
committerMark Brown <broonie@kernel.org>
Fri, 17 Mar 2017 13:12:22 +0000 (13:12 +0000)
commit0630b614391f8cbc35e837b4645ec8faaaa6465e
tree3d312fb1d2fb9f6d5470a22769d96d77b66f12b7
parentb7cd1b1386ff46e60452ad1f16530645761ca7b8
regulator: Mark supply_name const and duplicate it as such

The supply_name member of struct regulator can be const as we
don't change it in the regulator core. Furthermore, when we copy
the supply name we can use kstrdup_const() here to avoid a copy
if the name is in the ro data section.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c
drivers/regulator/internal.h