summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/qcom
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-07-23 22:27:37 +0300
committerLinus Walleij <linus.walleij@linaro.org>2019-08-05 12:55:41 +0300
commit720b8ec676cd2b1d30289c977b5fde08840cb6dd (patch)
tree3541ca824fd1c4aaf374273006ced1cb7618a063 /drivers/pinctrl/qcom
parenta1db8da7c28131ceb3200732e429eb9d30ce5929 (diff)
downloadlinux-720b8ec676cd2b1d30289c977b5fde08840cb6dd.tar.xz
pinctrl: msm: Switch to use device_property_count_uXX()
Use use device_property_count_uXX() directly, that makes code neater. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20190723192738.68486-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/qcom')
-rw-r--r--drivers/pinctrl/qcom/pinctrl-msm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index 73062e329f6f..0d082ed74eef 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -617,8 +617,7 @@ static int msm_gpio_init_valid_mask(struct gpio_chip *chip)
}
/* The number of GPIOs in the ACPI tables */
- len = ret = device_property_read_u16_array(pctrl->dev, "gpios", NULL,
- 0);
+ len = ret = device_property_count_u16(pctrl->dev, "gpios");
if (ret < 0)
return 0;
@@ -996,7 +995,7 @@ static bool msm_gpio_needs_valid_mask(struct msm_pinctrl *pctrl)
if (pctrl->soc->reserved_gpios)
return true;
- return device_property_read_u16_array(pctrl->dev, "gpios", NULL, 0) > 0;
+ return device_property_count_u16(pctrl->dev, "gpios") > 0;
}
static int msm_gpio_init(struct msm_pinctrl *pctrl)