summaryrefslogtreecommitdiff
path: root/drivers/power/gpio-charger.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/gpio-charger.c')
-rw-r--r--drivers/power/gpio-charger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/gpio-charger.c b/drivers/power/gpio-charger.c
index 8458cafcd2b2..43078e34428a 100644
--- a/drivers/power/gpio-charger.c
+++ b/drivers/power/gpio-charger.c
@@ -94,7 +94,7 @@ static int __devinit gpio_charger_probe(struct platform_device *pdev)
charger = &gpio_charger->charger;
- charger->name = pdata->name;
+ charger->name = pdata->name ? pdata->name : "gpio-charger";
charger->type = pdata->type;
charger->properties = gpio_charger_properties;
charger->num_properties = ARRAY_SIZE(gpio_charger_properties);