Skip to content

Commit

Permalink
gpio-charger: Provide default name for the power_supply
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars-Peter Clausen authored and Anton Vorontsov committed Dec 21, 2010
1 parent 2e9ff5f commit 80577b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/gpio-charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 80577b8

Please sign in to comment.