diff options
Diffstat (limited to 'drivers/staging/phison/phison.c')
| -rw-r--r-- | drivers/staging/phison/phison.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/drivers/staging/phison/phison.c b/drivers/staging/phison/phison.c index 3817d749704..3826561e774 100644 --- a/drivers/staging/phison/phison.c +++ b/drivers/staging/phison/phison.c @@ -12,7 +12,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 <linux/device.h> @@ -23,7 +22,7 @@ #define PHISON_DEBUG #define DRV_NAME "phison_e-box" /* #0003 */ -#define DRV_VERSION "0.91" /* #0003 */ +#define DRV_VERSION "0.91" /* #0003 */ #define PCI_VENDOR_ID_PHISON 0x1987 #define PCI_DEVICE_ID_PS5000 0x5000 @@ -56,21 +55,21 @@ static int phison_init_one(struct pci_dev *pdev, const struct pci_device_id *id) .pio_mask = 0x1f, .mwdma_mask = 0x07, - .udma_mask = ATA_UDMA5, + .udma_mask = ATA_UDMA5, .port_ops = &phison_ops, }; const struct ata_port_info *ppi[] = { &info, NULL }; - ret = ata_pci_sff_init_one(pdev, ppi, &phison_sht, NULL); + ret = ata_pci_bmdma_init_one(pdev, ppi, &phison_sht, NULL, 0); dev_dbg(&pdev->dev, "phison_init_one(), ret = %x\n", ret); return ret; } -static struct pci_device_id phison_pci_tbl[] = { - { PCI_VENDOR_ID_PHISON, PCI_DEVICE_ID_PS5000, PCI_ANY_ID, PCI_ANY_ID, +static const struct pci_device_id phison_pci_tbl[] = { + { PCI_DEVICE(PCI_VENDOR_ID_PHISON, PCI_DEVICE_ID_PS5000), PCI_CLASS_STORAGE_IDE << 8, 0xffff00, 0 }, { 0, }, }; @@ -87,18 +86,7 @@ static struct pci_driver phison_pci_driver = { #endif }; -static int __init phison_ide_init(void) -{ - return pci_register_driver(&phison_pci_driver); -} - -static void __exit phison_ide_exit(void) -{ - pci_unregister_driver(&phison_pci_driver); -} - -module_init(phison_ide_init); -module_exit(phison_ide_exit); +module_pci_driver(phison_pci_driver); MODULE_AUTHOR("Evan Ko"); MODULE_DESCRIPTION("PCIE driver module for PHISON PS5000 E-BOX"); |
