Skip to contentSkip to conversation

dmaengine: stm32-dmamux: Switch to use device_property_count_u32()

PATCH Applied Andy Shevchenko 2 participants 3 messages Jul 23, 2019 – Jul 29, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dmaengine: stm32-dmamux: Switch to use device_property_count_u32()

Use use device_property_count_u32() directly, that makes code neater.

---
 drivers/dma/stm32-dmamux.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma/stm32-dmamux.c +1 -2
index b552949da14b..3c89bd39e096 100644
@@ -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;
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 dmaengine: stm32-mdma: Switch to use device_property_count_u32()

Use use device_property_count_u32() directly, that makes code neater.

---
 drivers/dma/stm32-mdma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma/stm32-mdma.c +1 -2
index d6e919d3936a..0d56fde78c1f 100644
@@ -1555,8 +1555,7 @@ static int stm32_mdma_probe(struct platform_device *pdev)
 			 nr_requests);
 	}
 
-	count = device_property_read_u32_array(&pdev->dev, "st,ahb-addr-masks",
-					       NULL, 0);
+	count = device_property_count_u32(&pdev->dev, "st,ahb-addr-masks");
 	if (count < 0)
 		count = 0;
 
Signature · 1 line
2.20.1
maintainer Applied
#2 lore raw
In reply to Andy Shevchenko
Quoted 1 line · Andy Shevchenko

Use use device_property_count_u32() directly, that makes code neater.

Applied both, thanks

Signature · 1 line
~Vinod