Commit 09d3f6f1 authored by Mark Brown's avatar Mark Brown

Merge branch 'topic/core' of...

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
parents bfa21a0d 39138818
...@@ -3586,7 +3586,7 @@ regulator_register(const struct regulator_desc *regulator_desc, ...@@ -3586,7 +3586,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
const struct regulation_constraints *constraints = NULL; const struct regulation_constraints *constraints = NULL;
const struct regulator_init_data *init_data; const struct regulator_init_data *init_data;
struct regulator_config *config = NULL; struct regulator_config *config = NULL;
static atomic_t regulator_no = ATOMIC_INIT(0); static atomic_t regulator_no = ATOMIC_INIT(-1);
struct regulator_dev *rdev; struct regulator_dev *rdev;
struct device *dev; struct device *dev;
int ret, i; int ret, i;
...@@ -3669,8 +3669,8 @@ regulator_register(const struct regulator_desc *regulator_desc, ...@@ -3669,8 +3669,8 @@ regulator_register(const struct regulator_desc *regulator_desc,
/* register with sysfs */ /* register with sysfs */
rdev->dev.class = &regulator_class; rdev->dev.class = &regulator_class;
rdev->dev.parent = dev; rdev->dev.parent = dev;
dev_set_name(&rdev->dev, "regulator.%d", dev_set_name(&rdev->dev, "regulator.%lu",
atomic_inc_return(&regulator_no) - 1); (unsigned long) atomic_inc_return(&regulator_no));
ret = device_register(&rdev->dev); ret = device_register(&rdev->dev);
if (ret != 0) { if (ret != 0) {
put_device(&rdev->dev); put_device(&rdev->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment