diff mbox series

[v1,1/2] dmaengine: stm32-dmamux: Switch to use device_property_count_u32()

Message ID 20190723190757.67351-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State Accepted
Headers show
Series [v1,1/2] dmaengine: stm32-dmamux: Switch to use device_property_count_u32() | expand

Commit Message

Andy Shevchenko July 23, 2019, 7:07 p.m. UTC
Use use device_property_count_u32() directly, that makes code neater.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/dma/stm32-dmamux.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Vinod Koul July 29, 2019, 6:55 a.m. UTC | #1
On 23-07-19, 22:07, Andy Shevchenko wrote:
> Use use device_property_count_u32() directly, that makes code neater.

Applied both, thanks
diff mbox series

Patch

diff --git a/drivers/dma/stm32-dmamux.c b/drivers/dma/stm32-dmamux.c
index b552949da14b..3c89bd39e096 100644
--- a/drivers/dma/stm32-dmamux.c
+++ b/drivers/dma/stm32-dmamux.c
@@ -185,8 +185,7 @@  static int stm32_dmamux_probe(struct platform_device *pdev)
 	if (!node)
 		return -ENODEV;
 
-	count = device_property_read_u32_array(&pdev->dev, "dma-masters",
-					       NULL, 0);
+	count = device_property_count_u32(&pdev->dev, "dma-masters");
 	if (count < 0) {
 		dev_err(&pdev->dev, "Can't get DMA master(s) node\n");
 		return -ENODEV;