Skip to contentSkip to conversation

BUG? [PATCH] driver core: Add the ability to bind drivers to devices from userspace

DISCUSSION Michal Ostrowski 1 participant 1 message Aug 17, 2005

lore
Share & tools
lore
#0 lore raw

If a driver's probe function returns -ENXIO or -ENODEV, driver_probe_device() will translate that to return 0 (comments argue it is not an error).

Consequently driver_bind() will return 0 resulting in the write system-call that initiated all of this in returning 0 as well.

If one uses "echo" to write to a "bind" attribute, echo will continuously call write() trying to write to the attribute and always get 0 as a result and thus find itself in a loop trying to do the write.

Perhaps the translation of -ENZIO to -ENODEV to success in driver_probe_device() is not approriate here?

Signature · 1 line
Michal Ostrowski