aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/rz1000.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/rz1000.c')
-rw-r--r--drivers/ide/pci/rz1000.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/ide/pci/rz1000.c b/drivers/ide/pci/rz1000.c
index 532154adba29..8d11ee838a2a 100644
--- a/drivers/ide/pci/rz1000.c
+++ b/drivers/ide/pci/rz1000.c
@@ -21,6 +21,8 @@
21#include <linux/ide.h> 21#include <linux/ide.h>
22#include <linux/init.h> 22#include <linux/init.h>
23 23
24#define DRV_NAME "rz1000"
25
24static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif) 26static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif)
25{ 27{
26 struct pci_dev *dev = to_pci_dev(hwif->dev); 28 struct pci_dev *dev = to_pci_dev(hwif->dev);
@@ -40,7 +42,7 @@ static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif)
40} 42}
41 43
42static const struct ide_port_info rz1000_chipset __devinitdata = { 44static const struct ide_port_info rz1000_chipset __devinitdata = {
43 .name = "RZ100x", 45 .name = DRV_NAME,
44 .init_hwif = init_hwif_rz1000, 46 .init_hwif = init_hwif_rz1000,
45 .chipset = ide_rz1000, 47 .chipset = ide_rz1000,
46 .host_flags = IDE_HFLAG_NO_DMA, 48 .host_flags = IDE_HFLAG_NO_DMA,
@@ -48,7 +50,7 @@ static const struct ide_port_info rz1000_chipset __devinitdata = {
48 50
49static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id) 51static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id)
50{ 52{
51 return ide_setup_pci_device(dev, &rz1000_chipset); 53 return ide_pci_init_one(dev, &rz1000_chipset, NULL);
52} 54}
53 55
54static const struct pci_device_id rz1000_pci_tbl[] = { 56static const struct pci_device_id rz1000_pci_tbl[] = {
@@ -62,6 +64,7 @@ static struct pci_driver driver = {
62 .name = "RZ1000_IDE", 64 .name = "RZ1000_IDE",
63 .id_table = rz1000_pci_tbl, 65 .id_table = rz1000_pci_tbl,
64 .probe = rz1000_init_one, 66 .probe = rz1000_init_one,
67 .remove = ide_pci_remove,
65}; 68};
66 69
67static int __init rz1000_ide_init(void) 70static int __init rz1000_ide_init(void)
@@ -69,7 +72,13 @@ static int __init rz1000_ide_init(void)
69 return ide_pci_register_driver(&driver); 72 return ide_pci_register_driver(&driver);
70} 73}
71 74
75static void __exit rz1000_ide_exit(void)
76{
77 pci_unregister_driver(&driver);
78}
79
72module_init(rz1000_ide_init); 80module_init(rz1000_ide_init);
81module_exit(rz1000_ide_exit);
73 82
74MODULE_AUTHOR("Andre Hedrick"); 83MODULE_AUTHOR("Andre Hedrick");
75MODULE_DESCRIPTION("PCI driver module for RZ1000 IDE"); 84MODULE_DESCRIPTION("PCI driver module for RZ1000 IDE");