extcon: arizona: Switch to use device_property_count_u32()
PATCH 1/1 extcon: arizona: Switch to use device_property_count_u32()
Use use device_property_count_u32() directly, that makes code neater.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/extcon/extcon-arizona.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/extcon/extcon-arizona.c +1 -1
@@ -1253,7 +1253,7 @@ static int arizona_extcon_get_micd_configs(struct device *dev,int i, j;u32 *vals; - nconfs =device_property_read_u32_array (arizona->dev, prop,NULL ,0 ); + nconfs =device_property_count_u32 (arizona->dev, prop);if (nconfs <=0 )return 0 ;
Signature · 1 line
2.20.1
Quoted 4 lines · Andy Shevchenko
Use use
device_property_count_u32()directly, that makes code neater.Signed-off-by Andy Shevchenko <[email protected]>---
Acked-by Charles Keepax <[email protected]>
Thanks,
Charles
Quoted 13 lines · Andy Shevchenko
Use use
device_property_count_u32()directly, that makes code neater.Signed-off-by Andy Shevchenko <[email protected]>--- drivers/extcon/extcon-arizona.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/extcon/extcon-arizona.c +0
-0
drivers/extcon/extcon-arizona.c static int arizona_extcon_get_micd_configs(struct device *dev, · line 1259
Quoted 8 lines
drivers/extcon/extcon-arizona.c +1
-1@@ -1253,7 +1253,7 @@ static int arizona_extcon_get_micd_configs(struct device *dev,int i, j;u32 *vals; - nconfs =device_property_read_u32_array (arizona->dev, prop,NULL ,0 ); + nconfs =device_property_count_u32 (arizona->dev, prop);if (nconfs <=0 )return 0 ;
Applied it. Thanks.
Signature · 3 lines
Best Regards, Chanwoo Choi Samsung Electronics