[PATCH 19/19] serio use driver_find

From: Dmitry Torokhov
Date: Mon Jun 28 2004 - 00:51:09 EST



===================================================================


ChangeSet@xxxxxx, 2004-06-27 21:09:35-05:00, dtor_core@xxxxxxxxxxxxx
Input: serio - make use of driver_find instead of re-implementing it

Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>


serio.c | 4 +---
1 files changed, 1 insertion(+), 3 deletions(-)


===================================================================



diff -Nru a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
--- a/drivers/input/serio/serio.c 2004-06-27 21:24:26 -05:00
+++ b/drivers/input/serio/serio.c 2004-06-27 21:24:26 -05:00
@@ -261,7 +261,6 @@
{
struct serio *serio = to_serio_port(dev);
struct device_driver *drv;
- struct kobject *k;
int retval;

retval = down_interruptible(&serio_sem);
@@ -276,8 +275,7 @@
} else if (!strncmp(buf, "rescan", count)) {
serio_disconnect_port(serio);
serio_connect_port(serio, NULL);
- } else if ((k = kset_find_obj(&serio_bus.drivers, buf)) != NULL) {
- drv = container_of(k, struct device_driver, kobj);
+ } else if ((drv = driver_find(buf, &serio_bus)) != NULL) {
serio_disconnect_port(serio);
serio_connect_port(serio, to_serio_driver(drv));
} else {
-
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/