Commit 9e2b7b04 authored by Yang Yingliang's avatar Yang Yingliang Committed by David S. Miller

mt76: mt7615: Use devm_platform_get_and_ioremap_resource()

Use devm_platform_get_and_ioremap_resource() to simplify
code.
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8a55a734
...@@ -31,7 +31,6 @@ int mt7622_wmac_init(struct mt7615_dev *dev) ...@@ -31,7 +31,6 @@ int mt7622_wmac_init(struct mt7615_dev *dev)
static int mt7622_wmac_probe(struct platform_device *pdev) static int mt7622_wmac_probe(struct platform_device *pdev)
{ {
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
void __iomem *mem_base; void __iomem *mem_base;
int irq; int irq;
...@@ -39,7 +38,7 @@ static int mt7622_wmac_probe(struct platform_device *pdev) ...@@ -39,7 +38,7 @@ static int mt7622_wmac_probe(struct platform_device *pdev)
if (irq < 0) if (irq < 0)
return irq; return irq;
mem_base = devm_ioremap_resource(&pdev->dev, res); mem_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
if (IS_ERR(mem_base)) if (IS_ERR(mem_base))
return PTR_ERR(mem_base); return PTR_ERR(mem_base);
......
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