diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2010-11-18 17:08:39 -0500 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2010-12-21 18:29:04 -0500 |
commit | 80577b8a478f3386d106464f2a2241b2d43571ce (patch) | |
tree | 039c6e70db32e426a2c122d89b07623924e5f395 /drivers/power | |
parent | 2e9ff5f5e4c6b034554f3539f29529265279102c (diff) |
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>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/gpio-charger.c | 2 |
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) | |||
94 | 94 | ||
95 | charger = &gpio_charger->charger; | 95 | charger = &gpio_charger->charger; |
96 | 96 | ||
97 | charger->name = pdata->name; | 97 | charger->name = pdata->name ? pdata->name : "gpio-charger"; |
98 | charger->type = pdata->type; | 98 | charger->type = pdata->type; |
99 | charger->properties = gpio_charger_properties; | 99 | charger->properties = gpio_charger_properties; |
100 | charger->num_properties = ARRAY_SIZE(gpio_charger_properties); | 100 | charger->num_properties = ARRAY_SIZE(gpio_charger_properties); |