On Thu, 24 May 2007, Oliver Neukum wrote:

> Hi,
> 
> here's the use of anchors to implement a couple of methods in the
> skeleton driver, which is thus brought up to standard. This patch does:
> 
> - correctly handle disconnect with an anchor
> - correctly handle suspend with an anchor
> - correctly handle pre_reset with an anchor
> 
> in order to have a correct handling of pre_reset it further:
> 
> - introduces error reporting in the write path
> - reports resets to user space
> - implements flush() to isolate consecutive calls to open()

For a simple example driver, this is getting distressingly complicated.
Instead of worrying too much about error reporting, how about
implementing exclusive-open semantics?  That would simplify things a
lot.  Note that for simple drivers, exclusive-open is the rule rather
than the exception.

The order of your new routines is strange: suspend, pre_reset, resume,
post_reset.  It's more natural to do suspend, resume, pre_reset,
post_reset.

There is no call to usb_pm_put_interface().

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to