Messages in this thread | | | Date | Sat, 14 Feb 2004 04:21:34 +0000 | From | viro@parcelfa ... | Subject | Re: [PATCH 2.6 IrDA] new driver : stir4200 |
| |
On Fri, Feb 13, 2004 at 05:50:59PM -0800, Jean Tourrilhes wrote:
> +static void stir_disconnect(struct usb_interface *intf) > +{ > + struct stir_cb *stir = usb_get_intfdata(intf); > + struct net_device *net; > + > + usb_set_intfdata(intf, NULL); > + if (!stir) > + return; > + > + /* Stop transmitter */ > + net = stir->netdev; > + netif_device_detach(net); > + > + /* Remove netdevice */ > + unregister_netdev(net); > + > + /* No longer attached to USB bus */ > + stir->usbdev = NULL; > + > + free_netdev(net); > +}
1) Do we need netif_device_detach() there? 2) Shouldn't we leave usb_set_intfdata() until after unregister_netdev()? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |