mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-19 02:54:00 +08:00
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:
parent
2e9ff5f5e4
commit
80577b8a47
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user