[patch 07/13] i8042: Make sure we unregister PNP driver only once

From: Dmitry Torokhov
Date: Sun May 29 2005 - 00:35:55 EST


From: Kurt Garloff <garloff@xxxxxxx>

Input: Avoid double unregistering of i8042 PnP driver. This can happen
when no i8042 controller (not PnP, not legacy) is present.

From: Kurt Garloff <garloff@xxxxxxx>
Signed-off-by: Vojtech Pavlik <vojtech@xxxxxxx>
Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>
---

drivers/input/serio/i8042-x86ia64io.h | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)

Index: work/drivers/input/serio/i8042-x86ia64io.h
===================================================================
--- work.orig/drivers/input/serio/i8042-x86ia64io.h
+++ work/drivers/input/serio/i8042-x86ia64io.h
@@ -215,11 +215,15 @@ static struct pnp_driver i8042_pnp_aux_d

static void i8042_pnp_exit(void)
{
- if (i8042_pnp_kbd_registered)
+ if (i8042_pnp_kbd_registered) {
+ i8042_pnp_kbd_registered = 0;
pnp_unregister_driver(&i8042_pnp_kbd_driver);
+ }

- if (i8042_pnp_aux_registered)
+ if (i8042_pnp_aux_registered) {
+ i8042_pnp_aux_registered = 0;
pnp_unregister_driver(&i8042_pnp_aux_driver);
+ }
}

static int i8042_pnp_init(void)

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