Re: [PATCH] driver core: Add the ability to unbind drivers to devices from userspace

Michael Tokarev
2005-06-25T09:41:42Z

Dmitry Torokhov wrote:
[bind/unbind in device or driver dir in sysfs]
>
> Actually, I think that both should be in device's directory. When unbinding
> a device you normally don't care what driver it is bound to, you just want
> to make sure that there is no driver bound to the device afterwards. I.e it
> is a operation on device. When binding you could argue both ways, but then
> again you usually have a piece of hardware you want to assign specific driver
> for, so I'd say it is operation on device as well.

A small comment. How about having one file named 'bind', which acts like
either bind or unbind if nothing (empty string) has written to it?

(for fun.. that'd be 'driver' file, which, when read, returns the name
of the driver currently bound to the device.. but too bad, 'driver' is
a symlink already...)

/mjt