diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-09-04 16:58:58 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-09-04 19:19:14 +0300 |
commit | 425aa308a23cf321a7421bdada2f980ed87ae909 (patch) | |
tree | dd976928834e4bd708bdb3d6ae367d8800d3c765 /drivers/spi | |
parent | 362385c045f580c88d2882858ea77f965d25d46b (diff) | |
download | linux-425aa308a23cf321a7421bdada2f980ed87ae909.tar.xz |
spi: spi-meson-spifc: 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>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20190904135918.25352-17-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-meson-spifc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-meson-spifc.c b/drivers/spi/spi-meson-spifc.c index f7fe9b13d122..c7b039980291 100644 --- a/drivers/spi/spi-meson-spifc.c +++ b/drivers/spi/spi-meson-spifc.c @@ -286,7 +286,6 @@ static int meson_spifc_probe(struct platform_device *pdev) { struct spi_master *master; struct meson_spifc *spifc; - struct resource *res; void __iomem *base; unsigned int rate; int ret = 0; @@ -300,8 +299,7 @@ static int meson_spifc_probe(struct platform_device *pdev) spifc = spi_master_get_devdata(master); spifc->dev = &pdev->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(spifc->dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) { ret = PTR_ERR(base); goto out_err; |