Re: [PATCH 1/2] hid2hci: iterate libusb devices twice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 30, 2009 at 11:27, Kay Sievers<kay.sievers@xxxxxxxx> wrote:
> On Thu, Jul 30, 2009 at 10:37, Alan Stern<stern@xxxxxxxxxxxxxxxxxxx> wrote:

>> You know, the real problem may lie in bus_attach_device().  If probing
>> fails then it doesn't add the device to the bus -- and it doesn't even
>> return an error code when this happens.  One can argue that the device
>> should _always_ be added to the bus, regardless of whether a suitable
>> driver can be found.  If you accept that argument then linking the
>> device into the bus's list should be moved up into bus_add_device(),
>> which is called before the uevent.  Indeed, each of those two routines
>> has a comment in the kerneldoc saying "Add the device to its bus's list
>> of devices."  They can't both be right!
>
> That sounds like the right thing. We create all the links which
> indicate a membership at the bus, so we should put it to the bus at
> the same time.

It boots and runs fine here to move the klist_add_tail() up into
bus_add_device(). I guess we should do that.

Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux