lkml.org 
[lkml]   [2004]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.050 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site