mt76x0: pci: fix set external PA I/O current
authorYueHaibing <yuehaibing@huawei.com>
Mon, 8 Oct 2018 13:21:49 +0000 (13:21 +0000)
committerFelix Fietkau <nbd@nbd.name>
Sat, 13 Oct 2018 15:39:35 +0000 (17:39 +0200)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/mediatek/mt76/mt76x0/pci.c: In function 'mt76x0e_register_device':
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c:107:8: warning:
 variable 'data' set but not used [-Wunused-but-set-variable]

It seems correct value to write is 'data'

Fixes: 2b2cb40bcd7d ("mt76x0: pci: add hw initialization at bootstrap")
Acked-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c

index 10845f37af3792eb0ea981db59c35f459783b97d..cc8af17dc9c75182151966f75a1baeafc1a37689 100644 (file)
@@ -115,12 +115,12 @@ static int mt76x0e_register_device(struct mt76x02_dev *dev)
                if (val & MT_EE_NIC_CONF_0_PA_IO_CURRENT) {
                        u32 data;
 
-                       /* set external external PA I/O
+                       /* set external PA I/O
                         * current to 16mA
                         */
                        data = mt76_rr(dev, 0x11c);
-                       val |= 0xc03;
-                       mt76_wr(dev, 0x11c, val);
+                       data |= 0xc03;
+                       mt76_wr(dev, 0x11c, data);
                }
        }