提交 1c97db17 编写于 作者: A Andy Shevchenko 提交者: Sebastian Reichel

power: supply: core: Use device_property_string_array_count()

Use device_property_string_array_count() to get number of strings
in a string array property.
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com>
上级 e83c7204
......@@ -283,8 +283,7 @@ static int power_supply_check_supplies(struct power_supply *psy)
if (!psy->dev.parent)
return 0;
nval = device_property_read_string_array(psy->dev.parent,
"supplied-from", NULL, 0);
nval = device_property_string_array_count(psy->dev.parent, "supplied-from");
if (nval <= 0)
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册