Am Dienstag, 8. Juni 2010 10:37:51 schrieb Dmitry Torokhov:
On Mon, Jun 07, 2010 at 10:47:33PM +0200, Oliver Neukum wrote:
quoted
Am Montag, 7. Juni 2010 22:22:54 schrieb Alan Stern:
quoted
On Mon, 7 Jun 2010, Oliver Neukum wrote:
quoted
quoted
But other drivers don't do this. What's special about usbtouch?
Then I'd say the other drivers are wrong. We cannot leak USB specific
codes. Maybe we should pass -ENOMEM and -ENODEV, but the others
really don't mean anything as generic codes.
No, I'd say that usb_autopm_get_interface() is wrong - since it is
supposed to be used by drivers who are not concerned about USB-specific
codes these functions should not leak them to the callers but rather
provide ones suitable for reporting upstream.
But the driver may need to know why its request failed to handle errors
properly, for example it makes no sense to reset a device if you get -ENODEV.
Regards
Oliver