mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 11:09:57 +08:00
mcs814x: use devm_request_and_ioremap helper for nuport_mac driver
Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 36062
This commit is contained in:
parent
8bc84bac31
commit
8ed2299646
@ -1044,16 +1044,14 @@ static int __init nuport_mac_probe(struct platform_device *pdev)
|
||||
else
|
||||
priv->buffer_shifting_len = 2;
|
||||
|
||||
priv->mac_base = devm_ioremap(&pdev->dev,
|
||||
regs->start, resource_size(regs));
|
||||
priv->mac_base = devm_request_and_ioremap(&pdev->dev, regs);
|
||||
if (!priv->mac_base) {
|
||||
dev_err(&pdev->dev, "failed to remap regs\n");
|
||||
ret = -ENOMEM;
|
||||
goto out_platform;
|
||||
}
|
||||
|
||||
priv->dma_base = devm_ioremap(&pdev->dev,
|
||||
dma->start, resource_size(dma));
|
||||
priv->dma_base = devm_request_and_ioremap(&pdev->dev, dma);
|
||||
if (!priv->dma_base) {
|
||||
dev_err(&pdev->dev, "failed to remap dma-regs\n");
|
||||
ret = -ENOMEM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user