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

From: Michael Tokarev
Date: Sat Jun 25 2005 - 04:42:48 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/