aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-03 15:46:53 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-04 06:43:26 -0400
commit65f26846b90611742f3b407cc538a1cad33abde8 (patch)
tree4da36021e30f3428f6382673eb45343450b78a03 /drivers/regulator/core.c
parentdd775ae2549217d3ae09363e3edb305d0fa19928 (diff)
regulator: core: Constify the regulator_desc passed in when registering
Drivers should be able to declare their descriptors const and the framework shouldn't ever be modifying the desciptor. Make the parameter and the pointer in regulator_dev const to enforce this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index c056abd7562a..c4b626789f8e 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2829,7 +2829,8 @@ static void rdev_init_debugfs(struct regulator_dev *rdev)
2829 * Called by regulator drivers to register a regulator. 2829 * Called by regulator drivers to register a regulator.
2830 * Returns 0 on success. 2830 * Returns 0 on success.
2831 */ 2831 */
2832struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, 2832struct regulator_dev *
2833regulator_register(const struct regulator_desc *regulator_desc,
2833 struct device *dev, const struct regulator_init_data *init_data, 2834 struct device *dev, const struct regulator_init_data *init_data,
2834 void *driver_data, struct device_node *of_node) 2835 void *driver_data, struct device_node *of_node)
2835{ 2836{