mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +00:00
mt76x0: remove some usb specific code from mt76x0_register_device
Initial effort to make mt76x0_register_device bus neutral. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
c0eb79ab33
commit
6d1bced149
2 changed files with 10 additions and 10 deletions
|
@ -518,14 +518,6 @@ int mt76x0_register_device(struct mt76x0_dev *dev)
|
||||||
struct wiphy *wiphy = hw->wiphy;
|
struct wiphy *wiphy = hw->wiphy;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = mt76u_mcu_init_rx(mdev);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
ret = mt76u_alloc_queues(mdev);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
ret = mt76x0_init_hardware(dev);
|
ret = mt76x0_init_hardware(dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -46,7 +46,7 @@ static struct usb_device_id mt76x0_device_table[] = {
|
||||||
{ 0, }
|
{ 0, }
|
||||||
};
|
};
|
||||||
|
|
||||||
static int mt76x0_probe(struct usb_interface *usb_intf,
|
static int mt76x0u_probe(struct usb_interface *usb_intf,
|
||||||
const struct usb_device_id *id)
|
const struct usb_device_id *id)
|
||||||
{
|
{
|
||||||
struct usb_device *usb_dev = interface_to_usbdev(usb_intf);
|
struct usb_device *usb_dev = interface_to_usbdev(usb_intf);
|
||||||
|
@ -84,6 +84,14 @@ static int mt76x0_probe(struct usb_interface *usb_intf,
|
||||||
if (!(mt76_rr(dev, MT_EFUSE_CTRL) & MT_EFUSE_CTRL_SEL))
|
if (!(mt76_rr(dev, MT_EFUSE_CTRL) & MT_EFUSE_CTRL_SEL))
|
||||||
dev_warn(dev->mt76.dev, "Warning: eFUSE not present\n");
|
dev_warn(dev->mt76.dev, "Warning: eFUSE not present\n");
|
||||||
|
|
||||||
|
ret = mt76u_mcu_init_rx(&dev->mt76);
|
||||||
|
if (ret < 0)
|
||||||
|
goto err;
|
||||||
|
|
||||||
|
ret = mt76u_alloc_queues(&dev->mt76);
|
||||||
|
if (ret < 0)
|
||||||
|
goto err;
|
||||||
|
|
||||||
ret = mt76x0_register_device(dev);
|
ret = mt76x0_register_device(dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_hw;
|
goto err_hw;
|
||||||
|
@ -170,7 +178,7 @@ MODULE_LICENSE("GPL");
|
||||||
static struct usb_driver mt76x0_driver = {
|
static struct usb_driver mt76x0_driver = {
|
||||||
.name = KBUILD_MODNAME,
|
.name = KBUILD_MODNAME,
|
||||||
.id_table = mt76x0_device_table,
|
.id_table = mt76x0_device_table,
|
||||||
.probe = mt76x0_probe,
|
.probe = mt76x0u_probe,
|
||||||
.disconnect = mt76x0_disconnect,
|
.disconnect = mt76x0_disconnect,
|
||||||
.suspend = mt76x0_suspend,
|
.suspend = mt76x0_suspend,
|
||||||
.resume = mt76x0_resume,
|
.resume = mt76x0_resume,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue