]> err.no Git - linux-2.6/blobdiff - drivers/ide/ide-pnp.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6] / drivers / ide / ide-pnp.c
index 802efd4d97608eec1ca0c3e21fa8816bec2e575a..b163b2e522128d16bd513b1eac2346042878a377 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * linux/drivers/ide/ide-pnp.c
- *
  * This file provides autodetection for ISA PnP IDE interfaces.
  * It was tested with "ESS ES1868 Plug and Play AudioDrive" IDE interface.
  *
@@ -51,7 +49,7 @@ static int idepnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id
                printk(KERN_INFO "ide%d: generic PnP IDE interface\n", index);
                pnp_set_drvdata(dev,hwif);
 
-               ide_device_add(idx);
+               ide_device_add(idx, NULL);
 
                return 0;
        }
@@ -62,9 +60,10 @@ static int idepnp_probe(struct pnp_dev * dev, const struct pnp_device_id *dev_id
 static void idepnp_remove(struct pnp_dev * dev)
 {
        ide_hwif_t *hwif = pnp_get_drvdata(dev);
-       if (hwif) {
-               ide_unregister(hwif->index);
-       } else
+
+       if (hwif)
+               ide_unregister(hwif->index, 0, 0);
+       else
                printk(KERN_ERR "idepnp: Unable to remove device, please report.\n");
 }
 
@@ -75,12 +74,15 @@ static struct pnp_driver idepnp_driver = {
        .remove         = idepnp_remove,
 };
 
-void __init pnpide_init(void)
+static int __init pnpide_init(void)
 {
-       pnp_register_driver(&idepnp_driver);
+       return pnp_register_driver(&idepnp_driver);
 }
 
-void __exit pnpide_exit(void)
+static void __exit pnpide_exit(void)
 {
        pnp_unregister_driver(&idepnp_driver);
 }
+
+module_init(pnpide_init);
+module_exit(pnpide_exit);