Re: [PATCH 2.6 IrDA] new driver : stir4200

From: viro
Date: Fri Feb 13 2004 - 23:24:27 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/