提交 80577b8a 编写于 作者: L Lars-Peter Clausen 提交者: Anton Vorontsov

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: NLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
上级 2e9ff5f5
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册