mt76x2u: remove mt76x2u_alloc_device routine

Remove mt76x2u_alloc_device since it just runs mt76_alloc_device.
Move mt76_alloc_device call in mt76x2u_probe

Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2019-02-18 20:39:41 +01:00
committed by Felix Fietkau
parent 47d5922e14
commit c50c9933a9
3 changed files with 18 additions and 30 deletions
-23
View File
@@ -134,29 +134,6 @@ static int mt76x2u_init_eeprom(struct mt76x02_dev *dev)
return 0;
}
struct mt76x02_dev *mt76x2u_alloc_device(struct device *pdev)
{
static const struct mt76_driver_ops drv_ops = {
.tx_prepare_skb = mt76x02u_tx_prepare_skb,
.tx_complete_skb = mt76x02u_tx_complete_skb,
.tx_status_data = mt76x02_tx_status_data,
.rx_skb = mt76x02_queue_rx_skb,
.sta_add = mt76x02_sta_add,
.sta_remove = mt76x02_sta_remove,
};
struct mt76x02_dev *dev;
struct mt76_dev *mdev;
mdev = mt76_alloc_device(pdev, sizeof(*dev), &mt76x2u_ops,
&drv_ops);
if (!mdev)
return NULL;
dev = container_of(mdev, struct mt76x02_dev, mt76);
return dev;
}
int mt76x2u_init_hardware(struct mt76x02_dev *dev)
{
int i, k, err;