2019-07-24 01:47:19

by Andy Shevchenko

[permalink] [raw]
Subject: [PATCH v1] 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(-)

diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 7e9f4c9ee87d..e970134c95fa 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -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;

--
2.20.1


2019-07-24 08:22:27

by Charles Keepax

[permalink] [raw]
Subject: Re: [PATCH v1] extcon: arizona: Switch to use device_property_count_u32()

On Tue, Jul 23, 2019 at 08:40:21PM +0300, Andy Shevchenko wrote:
> 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

2019-07-24 10:12:34

by Chanwoo Choi

[permalink] [raw]
Subject: Re: [PATCH v1] extcon: arizona: Switch to use device_property_count_u32()

On 19. 7. 24. 오전 2:40, Andy Shevchenko wrote:
> 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(-)
>
> diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
> index 7e9f4c9ee87d..e970134c95fa 100644
> --- a/drivers/extcon/extcon-arizona.c
> +++ b/drivers/extcon/extcon-arizona.c
> @@ -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.

--
Best Regards,
Chanwoo Choi
Samsung Electronics