Skip to content

Commit f96087a

Browse files
Yang Yingliangbroonie
authored andcommitted
spi: spi-fsl-dspi: Use devm_platform_get_and_ioremap_resource()
Use the devm_platform_get_and_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately. Signed-off-by: Yang Yingliang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent a6bfc42 commit f96087a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/spi/spi-fsl-dspi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,8 +1294,7 @@ static int dspi_probe(struct platform_device *pdev)
12941294
else
12951295
ctlr->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 16);
12961296

1297-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1298-
base = devm_ioremap_resource(&pdev->dev, res);
1297+
base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
12991298
if (IS_ERR(base)) {
13001299
ret = PTR_ERR(base);
13011300
goto out_ctlr_put;

0 commit comments

Comments
 (0)