aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/regulator/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 02a774424e8d..9a644d41b813 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1779,8 +1779,8 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
1779 /* register with sysfs */ 1779 /* register with sysfs */
1780 rdev->dev.class = &regulator_class; 1780 rdev->dev.class = &regulator_class;
1781 rdev->dev.parent = dev; 1781 rdev->dev.parent = dev;
1782 snprintf(rdev->dev.bus_id, sizeof(rdev->dev.bus_id), 1782 dev_set_name(&rdev->dev, "regulator.%d",
1783 "regulator.%d", atomic_inc_return(&regulator_no) - 1); 1783 atomic_inc_return(&regulator_no) - 1);
1784 ret = device_register(&rdev->dev); 1784 ret = device_register(&rdev->dev);
1785 if (ret != 0) { 1785 if (ret != 0) {
1786 kfree(rdev); 1786 kfree(rdev);