Commit 1684789f authored by Thierry Reding's avatar Thierry Reding Committed by Greg Kroah-Hartman

misc: Convert to devm_ioremap_resource()

Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: default avatarThierry Reding <thierry.reding@avionic-design.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 06303c2e
...@@ -159,11 +159,9 @@ static int ssc_probe(struct platform_device *pdev) ...@@ -159,11 +159,9 @@ static int ssc_probe(struct platform_device *pdev)
return -ENXIO; return -ENXIO;
} }
ssc->regs = devm_request_and_ioremap(&pdev->dev, regs); ssc->regs = devm_ioremap_resource(&pdev->dev, regs);
if (!ssc->regs) { if (IS_ERR(ssc->regs))
dev_dbg(&pdev->dev, "ioremap failed\n"); return PTR_ERR(ssc->regs);
return -EINVAL;
}
ssc->phybase = regs->start; ssc->phybase = regs->start;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment