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>
This commit is contained in:
Lars-Peter Clausen 2010-11-18 23:08:39 +01:00 committed by Anton Vorontsov
parent 2e9ff5f5e4
commit 80577b8a47

View file

@ -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);