diff options
author | Lorenzo Bianconi | 2019-01-31 17:55:54 +0100 |
---|---|---|
committer | Felix Fietkau | 2019-02-18 19:54:34 +0100 |
commit | c0f7b25ab8d33adbead530dfc54b999fb69d5ede (patch) | |
tree | c89f598230daf1c1f2ef367e275c7b0e3c620938 /drivers/net/wireless/mediatek/mt76/mt76x0 | |
parent | mt76: increase ED/CCA tx block threshold (diff) | |
download | kernel-qcow2-linux-c0f7b25ab8d33adbead530dfc54b999fb69d5ede.tar.gz kernel-qcow2-linux-c0f7b25ab8d33adbead530dfc54b999fb69d5ede.tar.xz kernel-qcow2-linux-c0f7b25ab8d33adbead530dfc54b999fb69d5ede.zip |
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.c | 5 |
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); |