Driver bind/unbind and __devinit

From: Dmitry Torokhov
Date: Thu Dec 08 2005 - 16:14:30 EST


Hi,

Many drivers have their probe routines declared as __devinit which is
a no-op unless CONFIG_HOTPLUG is set. However driver's bind/unbind
attributes are created unconditionally, as fas as I can see. Would not
it cause an oops if someone tries to use these attributes with
CONFIG_HOTPLUG=N? Am I missing something?

Also, unbind implementation does not seem safe - we check the driver
before taking device's semaphore so we risk unbinding wrong driver (in
the unlikely event that we manage to unbind and bind another driver in
another thread).

--
Dmitry
-
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/