diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-06-10 17:25:35 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-10 14:00:49 -0700 |
commit | 9e2b7b0450cfc6a99ceaa37843cb5d0179e1c2ae (patch) | |
tree | bc3474d691ca481a4af5ea79ba212f0e5cffbf5c /drivers/net | |
parent | 8a55a73433e763c8aec4a3e8df5c28c821fc44b9 (diff) | |
download | linux-stable-9e2b7b0450cfc6a99ceaa37843cb5d0179e1c2ae.tar.gz linux-stable-9e2b7b0450cfc6a99ceaa37843cb5d0179e1c2ae.tar.bz2 linux-stable-9e2b7b0450cfc6a99ceaa37843cb5d0179e1c2ae.zip |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/soc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/soc.c b/drivers/net/wireless/mediatek/mt76/mt7615/soc.c index be9a69fe1b38..f13d1b418742 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/soc.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/soc.c @@ -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); |