Am Freitag, 25. Mai 2007 04:30 schrieb Alan Stern:
 
> For a simple example driver, this is getting distressingly complicated.

Our API is growing. We've introduced pre/post_reset and autosuspend
within a recentlyish timeframe. How could a generic example avoid reflecting
that?

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

It does not help. As yet I don't try to trace whose requests fail. Were
I to do that, the patch would become even larger. In that sense it does
implement exclusive open.

Apart from that a generic example must have proper error handling.
If we don't do it there we'll pay for it later fixing all derived drivers.

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

Before an event - after an event.
I'll change it. Furthermore, I'll break up this patch into pieces
to make it simpler to review.

> There is no call to usb_pm_put_interface().

Oops. Thanks.

        Regards
                Oliver

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