mt76: mt7615: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8a55a73433
commit
9e2b7b0450
|
@ -31,7 +31,6 @@ int mt7622_wmac_init(struct mt7615_dev *dev)
|
|||
|
||||
static int mt7622_wmac_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
void __iomem *mem_base;
|
||||
int irq;
|
||||
|
||||
|
@ -39,7 +38,7 @@ static int mt7622_wmac_probe(struct platform_device *pdev)
|
|||
if (irq < 0)
|
||||
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))
|
||||
return PTR_ERR(mem_base);
|
||||
|
||||
|
|
Loading…
Reference in New Issue