Files
linux/drivers
Ryan Wilson 372254018e [PATCH] driver core: driver_bind attribute returns incorrect value
The manual driver <-> device binding attribute in sysfs doesn't return
the correct value on failure or success of driver_probe_device.
driver_probe_device returns 1 on success (the driver accepted the
device) or 0 on probe failure (when the driver didn't accept the
device but no real error occured). However, the attribute can't just
return 0 or 1, it must return the number of bytes consumed from buf
or an error value. Returning 0 indicates to userspace that nothing
was written (even though the kernel has tried to do the bind/probe and
failed). Returning 1 indicates that only one character was accepted in
which case userspace will re-try the write with a partial string.

A more correct version of driver_bind would return count (to indicate
the entire string was consumed) when driver_probe_device returns 1
and -ENODEV when driver_probe_device returns 0. This patch makes that
change.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:41:25 -07:00
..
2006-04-11 06:18:46 -07:00
2006-04-11 06:18:45 -07:00
2006-03-27 08:44:51 -08:00
2006-04-11 06:18:40 -07:00
2006-03-29 13:24:50 +11:00
2006-04-11 06:18:43 -07:00
2006-04-11 06:18:47 -07:00
2006-04-11 06:18:38 -07:00
2006-04-11 06:18:44 -07:00
2006-03-23 07:38:16 -08:00
2006-03-24 18:23:14 +01:00
2006-03-31 12:18:56 -08:00