diff options
author | Dan Williams <dcbw@redhat.com> | 2007-05-25 13:13:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-06-11 14:28:40 -0400 |
commit | 7732ca45c68f893689a8c0d8c6e2eb2bfefbc087 (patch) | |
tree | b894177055e35cd426cf36d923adfd8985e4e9ed /drivers/net/wireless/libertas/if_usb.c | |
parent | 0681f989357416d7ef28ebaea4151ce70a6ae21c (diff) | |
download | talos-op-linux-7732ca45c68f893689a8c0d8c6e2eb2bfefbc087.tar.gz talos-op-linux-7732ca45c68f893689a8c0d8c6e2eb2bfefbc087.zip |
[PATCH] libertas: call SET_NETDEV_DEV from common code
Move usage of SET_NETDEV_DEV into common code since it has nothing
to do with bus-specific devices. Also fixes a bug where the mesh
device was getting SET_NETDEV_DEV called after register_netdevice,
resulting in no 'device' link in /sys/class/net/mshX/.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/if_usb.c')
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index d25e3b58e96b..6433be63fb7f 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c @@ -207,15 +207,10 @@ static int if_usb_probe(struct usb_interface *intf, } } - - /* At this point libertas_add_card() will be called. Don't worry - * about keeping pwlanpriv around since it will be set on our - * usb device data in -> add() -> hw_register_dev() -> if_usb_register_dev. - */ - if (!(priv = libertas_add_card(cardp))) + if (!(priv = libertas_add_card(cardp, &udev->dev))) goto dealloc; - if (libertas_add_mesh(priv)) + if (libertas_add_mesh(priv, &udev->dev)) goto err_add_mesh; priv->hw_register_dev = if_usb_register_dev; @@ -806,9 +801,6 @@ static int if_usb_register_dev(wlan_private * priv) cardp->eth_dev = priv->dev; priv->hotplug_device = &(cardp->udev->dev); - SET_NETDEV_DEV(cardp->eth_dev, &(cardp->udev->dev)); - SET_NETDEV_DEV(priv->mesh_dev, &(cardp->udev->dev)); - lbs_deb_usbd(&cardp->udev->dev, "udev pointer is at %p\n", cardp->udev); |