diff options
| author | Kunihiko Hayashi <[email protected]> | 2020-05-11 08:25:30 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2020-05-11 17:17:52 +0000 |
| commit | 5bc486156d840c15fb65c96da24f20687a07b2a4 (patch) | |
| tree | 8db1962e9e677aa9c4413eca3f9823c7dbd6d786 /drivers/spi/spi-uniphier.c | |
| parent | spi: uniphier: Depend on HAS_IOMEM (diff) | |
| download | kernel-5bc486156d840c15fb65c96da24f20687a07b2a4.tar.gz kernel-5bc486156d840c15fb65c96da24f20687a07b2a4.zip | |
spi: uniphier: Use devm_platform_get_and_ioremap_resource() to simplify code
Use devm_platform_get_and_ioremap_resource() to simplify code instead of
platform_get_resource() and devm_ioremap_resource(). This also gets
the resource that the following code uses.
Signed-off-by: Kunihiko Hayashi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/spi/spi-uniphier.c')
| -rw-r--r-- | drivers/spi/spi-uniphier.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/spi-uniphier.c b/drivers/spi/spi-uniphier.c index 0457d3376873..6a9ef8ee3cc9 100644 --- a/drivers/spi/spi-uniphier.c +++ b/drivers/spi/spi-uniphier.c @@ -659,8 +659,7 @@ static int uniphier_spi_probe(struct platform_device *pdev) priv->master = master; priv->is_save_param = false; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(&pdev->dev, res); + priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(priv->base)) { ret = PTR_ERR(priv->base); goto out_master_put; |
