mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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: Thierry Reding <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
06303c2e00
commit
1684789f86
1 changed files with 3 additions and 5 deletions
|
|
@ -159,11 +159,9 @@ static int ssc_probe(struct platform_device *pdev)
|
|||
return -ENXIO;
|
||||
}
|
||||
|
||||
ssc->regs = devm_request_and_ioremap(&pdev->dev, regs);
|
||||
if (!ssc->regs) {
|
||||
dev_dbg(&pdev->dev, "ioremap failed\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
ssc->regs = devm_ioremap_resource(&pdev->dev, regs);
|
||||
if (IS_ERR(ssc->regs))
|
||||
return PTR_ERR(ssc->regs);
|
||||
|
||||
ssc->phybase = regs->start;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue