From: Laurent Navet Date: Thu, 2 May 2013 12:39:34 +0000 (+0200) Subject: drivers: misc: use devm_ioremap_resource() X-Git-Tag: firefly_0821_release~6492 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e22253a9ee068ec84ac29b18c78fc4d5cadb652d;p=firefly-linux-kernel-4.4.55.git drivers: misc: use devm_ioremap_resource() Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource. Found with coccicheck and this semantic patch: scripts/coccinelle/api/devm_request_and_ioremap.cocci. Signed-off-by: Laurent Navet Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index 437192e43006..4a938860fec0 100644 --- a/drivers/misc/sram.c +++ b/drivers/misc/sram.c @@ -50,9 +50,10 @@ static int sram_probe(struct platform_device *pdev) size = resource_size(res); - virt_base = devm_request_and_ioremap(&pdev->dev, res); - if (!virt_base) - return -EADDRNOTAVAIL; + virt_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(virt_base)) + return PTR_ERR(virt_base); + sram = devm_kzalloc(&pdev->dev, sizeof(*sram), GFP_KERNEL); if (!sram)