mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm: 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: Thierry Reding <thierry.reding@avionic-design.de> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
7331205a96
commit
d4ed60259e
@@ -764,11 +764,9 @@ static int tegra_dc_probe(struct platform_device *pdev)
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
dc->regs = devm_request_and_ioremap(&pdev->dev, regs);
|
||||
if (!dc->regs) {
|
||||
dev_err(&pdev->dev, "failed to remap registers\n");
|
||||
return -ENXIO;
|
||||
}
|
||||
dc->regs = devm_ioremap_resource(&pdev->dev, regs);
|
||||
if (IS_ERR(dc->regs))
|
||||
return PTR_ERR(dc->regs);
|
||||
|
||||
dc->irq = platform_get_irq(pdev, 0);
|
||||
if (dc->irq < 0) {
|
||||
|
||||
@@ -1259,9 +1259,9 @@ static int tegra_hdmi_probe(struct platform_device *pdev)
|
||||
if (!regs)
|
||||
return -ENXIO;
|
||||
|
||||
hdmi->regs = devm_request_and_ioremap(&pdev->dev, regs);
|
||||
if (!hdmi->regs)
|
||||
return -EADDRNOTAVAIL;
|
||||
hdmi->regs = devm_ioremap_resource(&pdev->dev, regs);
|
||||
if (IS_ERR(hdmi->regs))
|
||||
return PTR_ERR(hdmi->regs);
|
||||
|
||||
err = platform_get_irq(pdev, 0);
|
||||
if (err < 0)
|
||||
|
||||
@@ -139,9 +139,9 @@ static int tegra_host1x_probe(struct platform_device *pdev)
|
||||
|
||||
host1x->irq = err;
|
||||
|
||||
host1x->regs = devm_request_and_ioremap(&pdev->dev, regs);
|
||||
if (!host1x->regs) {
|
||||
err = -EADDRNOTAVAIL;
|
||||
host1x->regs = devm_ioremap_resource(&pdev->dev, regs);
|
||||
if (IS_ERR(host1x->regs)) {
|
||||
err = PTR_ERR(host1x->regs);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user