diff options
Diffstat (limited to 'drivers/ide/pci/rz1000.c')
-rw-r--r-- | drivers/ide/pci/rz1000.c | 13 |
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 | |||
24 | static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif) | 26 | static 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 | ||
42 | static const struct ide_port_info rz1000_chipset __devinitdata = { | 44 | static 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 | ||
49 | static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 51 | static 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 | ||
54 | static const struct pci_device_id rz1000_pci_tbl[] = { | 56 | static 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 | ||
67 | static int __init rz1000_ide_init(void) | 70 | static 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 | ||
75 | static void __exit rz1000_ide_exit(void) | ||
76 | { | ||
77 | pci_unregister_driver(&driver); | ||
78 | } | ||
79 | |||
72 | module_init(rz1000_ide_init); | 80 | module_init(rz1000_ide_init); |
81 | module_exit(rz1000_ide_exit); | ||
73 | 82 | ||
74 | MODULE_AUTHOR("Andre Hedrick"); | 83 | MODULE_AUTHOR("Andre Hedrick"); |
75 | MODULE_DESCRIPTION("PCI driver module for RZ1000 IDE"); | 84 | MODULE_DESCRIPTION("PCI driver module for RZ1000 IDE"); |