diff options
author | Mark Brown <broonie@kernel.org> | 2015-01-09 19:03:55 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-09 19:03:55 +0100 |
commit | 09d3f6f1613f287b1d3ea7d2c9caf5b7aff70c99 (patch) | |
tree | 9f2923e577ca25a38eb7e0bb9cdb9d762c9b809e /drivers/regulator | |
parent | regulator: Allow parsing custom properties when using simplified DT parsing (diff) | |
parent | regulator: core: Fix format specifier warning (diff) | |
download | linux-09d3f6f1613f287b1d3ea7d2c9caf5b7aff70c99.tar.xz linux-09d3f6f1613f287b1d3ea7d2c9caf5b7aff70c99.zip |
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
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/core.c | 6 |
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, const struct regulation_constraints *constraints = NULL; const struct regulator_init_data *init_data; 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 device *dev; int ret, i; @@ -3669,8 +3669,8 @@ regulator_register(const struct regulator_desc *regulator_desc, /* register with sysfs */ rdev->dev.class = ®ulator_class; rdev->dev.parent = dev; - dev_set_name(&rdev->dev, "regulator.%d", - atomic_inc_return(®ulator_no) - 1); + dev_set_name(&rdev->dev, "regulator.%lu", + (unsigned long) atomic_inc_return(®ulator_no)); ret = device_register(&rdev->dev); if (ret != 0) { put_device(&rdev->dev); |