Subject: [PATCH 19/19] serio use driver_find
From: Dmitry Torokhov <[email-masked]>
To: Vojtech Pavlik <[email-masked]>
Cc: Andrew Morton <[email-masked]>, [email-masked]
Date: Mon, 28 Jun 2004 00:27:15 -0500

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

[email-masked], 2004-06-27 21:09:35-05:00, [email-masked]
  Input: serio - make use of driver_find instead of re-implementing it
  
  Signed-off-by: Dmitry Torokhov <[email-masked]>

 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 {