diff options
author | Yang Li <yang.lee@linux.alibaba.com> | 2023-03-14 13:58:26 +0800 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-04-11 17:10:10 +0200 |
commit | b6f790a5767bbc272d2904dedc92227f5457e9f5 (patch) | |
tree | 96070ba40fc128589e506587e8ae49eaa520fe69 | |
parent | 092e321ab05459b1eb2147b3d01b05a8629f59e5 (diff) | |
download | linux-stable-b6f790a5767bbc272d2904dedc92227f5457e9f5.tar.gz linux-stable-b6f790a5767bbc272d2904dedc92227f5457e9f5.tar.bz2 linux-stable-b6f790a5767bbc272d2904dedc92227f5457e9f5.zip |
media: atmel: atmel-isc: Use devm_platform_ioremap_resource()
According to commit 7945f929f1a7 ("drivers: provide
devm_platform_ioremap_resource()"), convert platform_get_resource(),
devm_ioremap_resource() to a single call to use
devm_platform_ioremap_resource(), as this is exactly what this function
does.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r-- | drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c | 4 | ||||
-rw-r--r-- | drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c b/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c index ba0614f981a2..eebb336efce7 100644 --- a/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c +++ b/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c @@ -389,7 +389,6 @@ static int atmel_isc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct isc_device *isc; - struct resource *res; void __iomem *io_base; struct isc_subdev_entity *subdev_entity; int irq; @@ -403,8 +402,7 @@ static int atmel_isc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, isc); isc->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - io_base = devm_ioremap_resource(dev, res); + io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(io_base)) return PTR_ERR(io_base); diff --git a/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c b/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c index 01ababdfcbd9..beed40fe3f91 100644 --- a/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c +++ b/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c @@ -378,7 +378,6 @@ static int microchip_xisc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct isc_device *isc; - struct resource *res; void __iomem *io_base; struct isc_subdev_entity *subdev_entity; int irq; @@ -392,8 +391,7 @@ static int microchip_xisc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, isc); isc->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - io_base = devm_ioremap_resource(dev, res); + io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(io_base)) return PTR_ERR(io_base); |