mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76usb: use usb_dev private data
Setup usb device private data. This allows to remove mt76u_buf->dev and simplify some routines as no longer we need to get usb device through usb interface. Signed-off-by: Stanislaw Gruszka <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
e1bfbeb162
commit
e9c017190e
+3
-1
@@ -50,7 +50,7 @@ static int mt76x2u_probe(struct usb_interface *intf,
|
||||
struct mt76_dev *mdev;
|
||||
int err;
|
||||
|
||||
mdev = mt76_alloc_device(&intf->dev, sizeof(*dev), &mt76x2u_ops,
|
||||
mdev = mt76_alloc_device(&udev->dev, sizeof(*dev), &mt76x2u_ops,
|
||||
&drv_ops);
|
||||
if (!mdev)
|
||||
return -ENOMEM;
|
||||
@@ -60,6 +60,8 @@ static int mt76x2u_probe(struct usb_interface *intf,
|
||||
udev = usb_get_dev(udev);
|
||||
usb_reset_device(udev);
|
||||
|
||||
usb_set_intfdata(intf, dev);
|
||||
|
||||
mt76x02u_init_mcu(mdev);
|
||||
err = mt76u_init(mdev, intf);
|
||||
if (err < 0)
|
||||
|
||||
Reference in New Issue
Block a user