summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-coldfire-qspi.c
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-09-04 16:58:53 +0300
committerMark Brown <broonie@kernel.org>2019-09-04 19:17:56 +0300
commit1e2d65d06d4160d9b0db317302d7020449440da5 (patch)
tree8e045d69aa4f3359ed921b61b8957988f6fd295f /drivers/spi/spi-coldfire-qspi.c
parentae43724d6439f1d5682d07af76dfe316b11bf041 (diff)
downloadlinux-1e2d65d06d4160d9b0db317302d7020449440da5.tar.xz
spi: coldfire-qspi: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190904135918.25352-12-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/spi-coldfire-qspi.c')
-rw-r--r--drivers/spi/spi-coldfire-qspi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c
index 5ff48ab2f534..f80e06c87fbe 100644
--- a/drivers/spi/spi-coldfire-qspi.c
+++ b/drivers/spi/spi-coldfire-qspi.c
@@ -339,7 +339,6 @@ static int mcfqspi_probe(struct platform_device *pdev)
{
struct spi_master *master;
struct mcfqspi *mcfqspi;
- struct resource *res;
struct mcfqspi_platform_data *pdata;
int status;
@@ -362,8 +361,7 @@ static int mcfqspi_probe(struct platform_device *pdev)
mcfqspi = spi_master_get_devdata(master);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- mcfqspi->iobase = devm_ioremap_resource(&pdev->dev, res);
+ mcfqspi->iobase = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(mcfqspi->iobase)) {
status = PTR_ERR(mcfqspi->iobase);
goto fail0;