]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/ata/pata_opti.c
ENGR00301869-1 iio: adc: Enable i.MX6SX adc driver.
[karo-tx-linux.git] / drivers / ata / pata_opti.c
index accc033faf77c12342f2f375f7155257b717d66f..3a944a029264a4d224bd93e1ca9cc1a16491fe67 100644 (file)
@@ -26,7 +26,6 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/pci.h>
-#include <linux/init.h>
 #include <linux/blkdev.h>
 #include <linux/delay.h>
 #include <scsi/scsi_host.h>
@@ -185,28 +184,16 @@ static struct pci_driver opti_pci_driver = {
        .id_table       = opti,
        .probe          = opti_init_one,
        .remove         = ata_pci_remove_one,
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
        .suspend        = ata_pci_device_suspend,
        .resume         = ata_pci_device_resume,
 #endif
 };
 
-static int __init opti_init(void)
-{
-       return pci_register_driver(&opti_pci_driver);
-}
-
-static void __exit opti_exit(void)
-{
-       pci_unregister_driver(&opti_pci_driver);
-}
-
+module_pci_driver(opti_pci_driver);
 
 MODULE_AUTHOR("Alan Cox");
 MODULE_DESCRIPTION("low-level driver for Opti 621/621X");
 MODULE_LICENSE("GPL");
 MODULE_DEVICE_TABLE(pci, opti);
 MODULE_VERSION(DRV_VERSION);
-
-module_init(opti_init);
-module_exit(opti_exit);