gpio-charger: Provide default name for the power_supply

This patch sets a default name for the power_supply in case there was
no name supplied through the platform_data.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
diff --git a/drivers/power/gpio-charger.c b/drivers/power/gpio-charger.c
index 8458caf..43078e3 100644
--- a/drivers/power/gpio-charger.c
+++ b/drivers/power/gpio-charger.c
@@ -94,7 +94,7 @@
 
 	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);