dmaengine: stm32-dmamux: Switch to use device_property_count_u32()
PATCH 1/2 dmaengine: stm32-dmamux: Switch to use device_property_count_u32()
Use use device_property_count_u32() directly, that makes code neater.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/dma/stm32-dmamux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma/stm32-dmamux.c +1 -2
@@ -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
PATCH 2/2 dmaengine: stm32-mdma: Switch to use device_property_count_u32()
Use use device_property_count_u32() directly, that makes code neater.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/dma/stm32-mdma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma/stm32-mdma.c +1 -2
@@ -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
Quoted 1 line · Andy Shevchenko
Use use
device_property_count_u32()directly, that makes code neater.
Applied both, thanks
Signature · 1 line
~Vinod