aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-29 10:55:17 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2011-01-12 09:33:01 -0500
commitf8c12fe329c8da9f50d8b2b1183eeaa4d587e747 (patch)
tree8ec2dee6efcf6a6a96e161bf9a86c6d9befb2a58 /include/linux
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')
-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 4275cd475eac..cce575359712 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -192,7 +192,7 @@ struct regulator_dev {
192}; 192};
193 193
194struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, 194struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
195 struct device *dev, struct regulator_init_data *init_data, 195 struct device *dev, const struct regulator_init_data *init_data,
196 void *driver_data); 196 void *driver_data);
197void regulator_unregister(struct regulator_dev *rdev); 197void regulator_unregister(struct regulator_dev *rdev);
198 198