extcon: arizona: Switch to use device_property_count_u32()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 23 Jul 2019 17:40:21 +0000 (20:40 +0300)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 24 Jul 2019 09:57:42 +0000 (18:57 +0900)
Use use device_property_count_u32() directly, that makes code neater.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon-arizona.c

index 7e9f4c9..e970134 100644 (file)
@@ -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;