Commit 7bc01bc6 authored by Adam Belay's avatar Adam Belay

[PNP]: Fix Serial PnP driver

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.
parent 5ada03a9
......@@ -413,7 +413,9 @@ serial_pnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id)
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 = {
......@@ -430,7 +432,7 @@ static int __init serial8250_pnp_init(void)
static void __exit serial8250_pnp_exit(void)
{
/* FIXME */
pnp_unregister_driver(&serial_pnp_driver);
}
module_init(serial8250_pnp_init);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment