aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-01-09 13:03:55 -0500
committerMark Brown <broonie@kernel.org>2015-01-09 13:03:55 -0500
commit09d3f6f1613f287b1d3ea7d2c9caf5b7aff70c99 (patch)
tree9f2923e577ca25a38eb7e0bb9cdb9d762c9b809e
parentbfa21a0dfe6915dc85953b5d40ea9dae5fdf205f (diff)
parent39138818a4f5c62d70f35504477c2509f982f211 (diff)
Merge branch 'topic/core' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-dt-cb
Conflicts: drivers/regulator/core.c
-rw-r--r--drivers/regulator/core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 5fae8cabd254..685cc1500e38 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3586,7 +3586,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
3586 const struct regulation_constraints *constraints = NULL; 3586 const struct regulation_constraints *constraints = NULL;
3587 const struct regulator_init_data *init_data; 3587 const struct regulator_init_data *init_data;
3588 struct regulator_config *config = NULL; 3588 struct regulator_config *config = NULL;
3589 static atomic_t regulator_no = ATOMIC_INIT(0); 3589 static atomic_t regulator_no = ATOMIC_INIT(-1);
3590 struct regulator_dev *rdev; 3590 struct regulator_dev *rdev;
3591 struct device *dev; 3591 struct device *dev;
3592 int ret, i; 3592 int ret, i;
@@ -3669,8 +3669,8 @@ regulator_register(const struct regulator_desc *regulator_desc,
3669 /* register with sysfs */ 3669 /* register with sysfs */
3670 rdev->dev.class = &regulator_class; 3670 rdev->dev.class = &regulator_class;
3671 rdev->dev.parent = dev; 3671 rdev->dev.parent = dev;
3672 dev_set_name(&rdev->dev, "regulator.%d", 3672 dev_set_name(&rdev->dev, "regulator.%lu",
3673 atomic_inc_return(&regulator_no) - 1); 3673 (unsigned long) atomic_inc_return(&regulator_no));
3674 ret = device_register(&rdev->dev); 3674 ret = device_register(&rdev->dev);
3675 if (ret != 0) { 3675 if (ret != 0) {
3676 put_device(&rdev->dev); 3676 put_device(&rdev->dev);