aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/jmicron.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/jmicron.c')
-rw-r--r--drivers/ide/pci/jmicron.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/ide/pci/jmicron.c b/drivers/ide/pci/jmicron.c
index 96ef7394f283..545b6e172d9b 100644
--- a/drivers/ide/pci/jmicron.c
+++ b/drivers/ide/pci/jmicron.c
@@ -12,6 +12,8 @@
12#include <linux/ide.h> 12#include <linux/ide.h>
13#include <linux/init.h> 13#include <linux/init.h>
14 14
15#define DRV_NAME "jmicron"
16
15typedef enum { 17typedef enum {
16 PORT_PATA0 = 0, 18 PORT_PATA0 = 0,
17 PORT_PATA1 = 1, 19 PORT_PATA1 = 1,
@@ -102,7 +104,7 @@ static const struct ide_port_ops jmicron_port_ops = {
102}; 104};
103 105
104static const struct ide_port_info jmicron_chipset __devinitdata = { 106static const struct ide_port_info jmicron_chipset __devinitdata = {
105 .name = "JMB", 107 .name = DRV_NAME,
106 .enablebits = { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } }, 108 .enablebits = { { 0x40, 0x01, 0x01 }, { 0x40, 0x10, 0x10 } },
107 .port_ops = &jmicron_port_ops, 109 .port_ops = &jmicron_port_ops,
108 .pio_mask = ATA_PIO5, 110 .pio_mask = ATA_PIO5,
@@ -121,7 +123,7 @@ static const struct ide_port_info jmicron_chipset __devinitdata = {
121 123
122static int __devinit jmicron_init_one(struct pci_dev *dev, const struct pci_device_id *id) 124static int __devinit jmicron_init_one(struct pci_dev *dev, const struct pci_device_id *id)
123{ 125{
124 return ide_setup_pci_device(dev, &jmicron_chipset); 126 return ide_pci_init_one(dev, &jmicron_chipset, NULL);
125} 127}
126 128
127/* All JMB PATA controllers have and will continue to have the same 129/* All JMB PATA controllers have and will continue to have the same
@@ -152,6 +154,7 @@ static struct pci_driver driver = {
152 .name = "JMicron IDE", 154 .name = "JMicron IDE",
153 .id_table = jmicron_pci_tbl, 155 .id_table = jmicron_pci_tbl,
154 .probe = jmicron_init_one, 156 .probe = jmicron_init_one,
157 .remove = ide_pci_remove,
155}; 158};
156 159
157static int __init jmicron_ide_init(void) 160static int __init jmicron_ide_init(void)
@@ -159,7 +162,13 @@ static int __init jmicron_ide_init(void)
159 return ide_pci_register_driver(&driver); 162 return ide_pci_register_driver(&driver);
160} 163}
161 164
165static void __exit jmicron_ide_exit(void)
166{
167 pci_unregister_driver(&driver);
168}
169
162module_init(jmicron_ide_init); 170module_init(jmicron_ide_init);
171module_exit(jmicron_ide_exit);
163 172
164MODULE_AUTHOR("Alan Cox"); 173MODULE_AUTHOR("Alan Cox");
165MODULE_DESCRIPTION("PCI driver module for the JMicron in legacy modes"); 174MODULE_DESCRIPTION("PCI driver module for the JMicron in legacy modes");