summaryrefslogtreecommitdiffstats
path: root/Kconfig
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-08-14 12:41:50 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-08-28 11:00:28 -0700
commit0ffff5a60fdd7455c83855ee788a8aae9a79aab4 (patch)
tree5a75585df8ecc9bbdf916cae20b70bee4d3a377d /Kconfig
parentf9cfbde723ba89b7bf7d1ec0b8adeea0c3c4a091 (diff)
downloadop-kernel-dev-0ffff5a60fdd7455c83855ee788a8aae9a79aab4.zip
op-kernel-dev-0ffff5a60fdd7455c83855ee788a8aae9a79aab4.tar.gz
regulator: twl: make twl_info tables const
I currently carry the series to make of_device_id->data const in the arm-soc tree, which fixes a number of issues, but leaves one new compiler warning about the twl-regulator driver: drivers/regulator/twl-regulator.c: In function 'twlreg_probe': drivers/regulator/twl-regulator.c:1130:8: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] drivers/regulator/twl-regulator.c:1139:9: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] The warning indicates that the driver takes a static table with initialization data for each regulator, modifies the data in place and passes a pointer to that structure to the regulator_register function. This is probably ok because a system contains only one instance of each regulator, but it's still bad style because any driver should be written to support multiple instances of the same hardware. This patch changes the code to dynamically allocate the memory we pass to the regulator core so the table can be constant. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud