lkml.org 
[lkml]   [2004]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linux-usb-devel] 2.6.6-rc1: cdc-acm still (differently) broken
On Thu, 15 Apr 2004, Colin Leroy wrote:

> Like this one? It works. I'm a bit wondering, however, how comes
> usb_interface_claimed() returns true, and the check in
> usb_driver_claim_interface() passes?

While an interface is being probed, usb_interface_claimed() will always
return true for it. That's because the probing code sets
interface->dev.driver (which is what usb_interface_claimed() tests) before
calling the probe function. If the probe fails then interface->dev.driver
will be reset. This all happens inside bus_match() in drivers/base/bus.c.

For the same reason, the test of (dev->driver) in
usb_driver_claim_interface() -- that is the test you meant, isn't it? --
passes (i.e., yields a true value).

Alan Stern

-
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:02    [W:0.094 / U:1.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site