summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-02-02 20:24:50 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2022-02-28 13:06:22 +0100
commit43fa33aaf050f36867b018f2fd50aea26a6a1729 (patch)
treee6fce460144053f960d1ee6100cc2f93a405ca55 /drivers/mmc
parenta25ebe4e59a333c881621b8caf653e56a757c9b6 (diff)
mmc: dw_mmc: 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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220202182450.54925-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/dw_mmc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 99b201921954..3420a7ad6098 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -3057,8 +3057,7 @@ static void dw_mci_init_dma(struct dw_mci *host)
dev_info(host->dev, "Using internal DMA controller.\n");
} else {
/* TRANS_MODE_EDMAC: check dma bindings again */
- if ((device_property_read_string_array(dev, "dma-names",
- NULL, 0) < 0) ||
+ if ((device_property_string_array_count(dev, "dma-names") < 0) ||
!device_property_present(dev, "dmas")) {
goto no_dma;
}