* [PATCH v1 1/1] mmc: dw_mmc: Use device_property_string_array_count()
@ 2022-02-02 18:24 Andy Shevchenko
2022-02-08 15:12 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2022-02-02 18:24 UTC (permalink / raw)
To: Ulf Hansson, linux-mmc, linux-kernel; +Cc: Jaehoon Chung, Andy Shevchenko
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>
---
drivers/mmc/host/dw_mmc.c | 3 +--
1 file changed, 1 insertion(+), 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;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] mmc: dw_mmc: Use device_property_string_array_count()
2022-02-02 18:24 [PATCH v1 1/1] mmc: dw_mmc: Use device_property_string_array_count() Andy Shevchenko
@ 2022-02-08 15:12 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2022-02-08 15:12 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-mmc, linux-kernel, Jaehoon Chung
On Wed, 2 Feb 2022 at 19:24, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> 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>
Applied for next, thanks!
Kind regards
Uffe
> ---
> drivers/mmc/host/dw_mmc.c | 3 +--
> 1 file changed, 1 insertion(+), 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;
> }
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-08 15:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-02 18:24 [PATCH v1 1/1] mmc: dw_mmc: Use device_property_string_array_count() Andy Shevchenko
2022-02-08 15:12 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox