Re: [PATCH] fix usb skeleton driver

From: Stefani Seibold
Date: Wed Jun 06 2012 - 03:45:40 EST


Am Mittwoch, den 06.06.2012, 09:29 +0200 schrieb Oliver Neukum:
> Am Mittwoch, 6. Juni 2012, 09:00:36 schrieb stefani@xxxxxxxxxxx:
> > From: Stefani Seibold <stefani@xxxxxxxxxxx>
> >
> > This is a fix for the USB skeleton driver to bring it in shape.
> >
> > - The usb_device structure pointer will no longer stored
> > - Every access to the USB will be handled trought the usb_interface pointer
> > - No longer assign a NULL to usb_interface pointer in the disconnect() handler
>
> Why? What is gained?
>

All of this topics was suggested by Greg.

If a NULL is assigned to the usb_interface pointer, the skel_delete
cannot do an usb_put_dev() since the usb_device pointer is no longer
available.

Greetings

--
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/