diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-10-16 05:56:04 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2019-11-05 08:55:54 -0300 |
commit | 60afcc06ad4129af6705c1b053a4275c94d97c50 (patch) | |
tree | 2d9394ed59683f16a72b9e7c162850d47ecdf340 /drivers/staging/media/sunxi | |
parent | 5ebc4b2eb4338e3c936bf095d688141bf916daf2 (diff) |
media: staging: media: cedrus: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging/media/sunxi')
-rw-r--r-- | drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_hw.c b/drivers/staging/media/sunxi/cedrus/cedrus_hw.c index 570a9165dd5d..93347d3ba360 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus_hw.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus_hw.c @@ -138,7 +138,6 @@ static irqreturn_t cedrus_irq(int irq, void *data) int cedrus_hw_probe(struct cedrus_dev *dev) { const struct cedrus_variant *variant; - struct resource *res; int irq_dec; int ret; @@ -217,8 +216,7 @@ int cedrus_hw_probe(struct cedrus_dev *dev) goto err_sram; } - res = platform_get_resource(dev->pdev, IORESOURCE_MEM, 0); - dev->base = devm_ioremap_resource(dev->dev, res); + dev->base = devm_platform_ioremap_resource(dev->pdev, 0); if (IS_ERR(dev->base)) { dev_err(dev->dev, "Failed to map registers\n"); |