summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt76x0
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>2019-01-31 19:55:54 +0300
committerFelix Fietkau <nbd@nbd.name>2019-02-18 21:54:34 +0300
commitc0f7b25ab8d33adbead530dfc54b999fb69d5ede (patch)
treec89f598230daf1c1f2ef367e275c7b0e3c620938 /drivers/net/wireless/mediatek/mt76/mt76x0
parentf1906fb24901460fdc0ba7c8bbfe416fb705c8a6 (diff)
downloadlinux-c0f7b25ab8d33adbead530dfc54b999fb69d5ede.tar.xz
mt76: move alloc_device common code in mt76_alloc_device
Move mt76x{0,2} alloc_device common code in mt76_alloc_device and remove duplicated code Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x0')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt76x0/init.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
index 87b575fe1c74..34db3ec24e6e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
@@ -270,13 +270,10 @@ mt76x0_alloc_device(struct device *pdev,
struct mt76x02_dev *dev;
struct mt76_dev *mdev;
- mdev = mt76_alloc_device(sizeof(*dev), ops);
+ mdev = mt76_alloc_device(pdev, sizeof(*dev), ops, drv_ops);
if (!mdev)
return NULL;
- mdev->dev = pdev;
- mdev->drv = drv_ops;
-
dev = container_of(mdev, struct mt76x02_dev, mt76);
mutex_init(&dev->phy_mutex);