Re: [PATCH] PnP Updates for 2.6.2-rc2

From: Adam Belay
Date: Fri Jan 30 2004 - 00:12:38 EST


The serial driver currently fails to unregister its pnp driver upon module
unload. This patch corrects the problem by calling pnp_unregister_driver and
implementing a proper remove function.

--- a/drivers/serial/8250_pnp.c 2004-01-28 22:35:02.000000000 +0000
+++ b/drivers/serial/8250_pnp.c 2004-01-28 22:33:40.000000000 +0000
@@ -418,7 +418,9 @@

static void serial_pnp_remove(struct pnp_dev * dev)
{
- return;
+ int line = (int)pnp_get_drvdata(dev);
+ if (line)
+ unregister_serial(line - 1);
}

static struct pnp_driver serial_pnp_driver = {
@@ -435,7 +437,7 @@

static void __exit serial8250_pnp_exit(void)
{
- /* FIXME */
+ pnp_unregister_driver(&serial_pnp_driver);
}

module_init(serial8250_pnp_init);
-
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/