summaryrefslogtreecommitdiffstats
path: root/include/linux/regulator/driver.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-29 15:55:17 +0000
committerLiam Girdwood <lrg@slimlogic.co.uk>2011-01-12 14:33:01 +0000
commitf8c12fe329c8da9f50d8b2b1183eeaa4d587e747 (patch)
tree8ec2dee6efcf6a6a96e161bf9a86c6d9befb2a58 /include/linux/regulator/driver.h
parentf4d6adf11b0a596ac4fee2fb2591f286de35c088 (diff)
regulator: Copy constraints from regulators when initialising them
Currently the regulator API uses the constraints structure passed in to the core throughout the lifetime of the object. This means that it is not possible to mark the constraints as __initdata so if the kernel supports many boards the constraints for all of them are kept around throughout the lifetime of the system, consuming memory needlessly. By copying constraints that are actually used we allow the use of __initdata, saving memory when multiple boards are supported. This also means the constraints can be const. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'include/linux/regulator/driver.h')
-rw-r--r--include/linux/regulator/driver.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 4275cd475ea..cce57535971 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -192,7 +192,7 @@ struct regulator_dev {
};
struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
- struct device *dev, struct regulator_init_data *init_data,
+ struct device *dev, const struct regulator_init_data *init_data,
void *driver_data);
void regulator_unregister(struct regulator_dev *rdev);