Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git] / drivers / ide / ide-pnp.c
index 40d60dd..98410ca 100644 (file)
 #include <linux/init.h>
 #include <linux/pnp.h>
 #include <linux/ide.h>
-#include <linux/delay.h>
 
 /* Add your devices here :)) */
-struct pnp_device_id idepnp_devices[] = {
+static struct pnp_device_id idepnp_devices[] = {
        /* Generic ESDI/IDE/ATA compatible hard disk controller */
        {.id = "PNP0600", .driver_data = 0},
        {.id = ""}
@@ -58,11 +57,7 @@ static void idepnp_remove(struct pnp_dev * dev)
 {
        ide_hwif_t *hwif = pnp_get_drvdata(dev);
        if (hwif) {
-               /* FIXME: will want pushing into a helper workqueue */
-               while(ide_unregister_hwif(hwif) < 0) {
-                       removed_hwif_iops(hwif);
-                       msleep(1000);
-               }
+               ide_unregister(hwif->index);
        } else
                printk(KERN_ERR "idepnp: Unable to remove device, please report.\n");
 }
@@ -78,3 +73,8 @@ void __init pnpide_init(void)
 {
        pnp_register_driver(&idepnp_driver);
 }
+
+void __exit pnpide_exit(void)
+{
+       pnp_unregister_driver(&idepnp_driver);
+}