summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/power/bq24257_charger.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/power/bq24257_charger.c')
-rw-r--r--kernel/drivers/power/bq24257_charger.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/drivers/power/bq24257_charger.c b/kernel/drivers/power/bq24257_charger.c
index 1fea2c7ef..6fc31bdc6 100644
--- a/kernel/drivers/power/bq24257_charger.c
+++ b/kernel/drivers/power/bq24257_charger.c
@@ -1068,6 +1068,12 @@ static int bq24257_probe(struct i2c_client *client,
return ret;
}
+ ret = bq24257_power_supply_init(bq);
+ if (ret < 0) {
+ dev_err(dev, "Failed to register power supply\n");
+ return ret;
+ }
+
ret = devm_request_threaded_irq(dev, client->irq, NULL,
bq24257_irq_handler_thread,
IRQF_TRIGGER_FALLING |
@@ -1078,12 +1084,6 @@ static int bq24257_probe(struct i2c_client *client,
return ret;
}
- ret = bq24257_power_supply_init(bq);
- if (ret < 0) {
- dev_err(dev, "Failed to register power supply\n");
- return ret;
- }
-
ret = sysfs_create_group(&bq->charger->dev.kobj, &bq24257_attr_group);
if (ret < 0) {
dev_err(dev, "Can't create sysfs entries\n");