diff options
Diffstat (limited to 'drivers/ide/pci/atiixp.c')
-rw-r--r-- | drivers/ide/pci/atiixp.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index 8b637181681a..332f08f43b56 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c | |||
@@ -11,6 +11,8 @@ | |||
11 | #include <linux/ide.h> | 11 | #include <linux/ide.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | 13 | ||
14 | #define DRV_NAME "atiixp" | ||
15 | |||
14 | #define ATIIXP_IDE_PIO_TIMING 0x40 | 16 | #define ATIIXP_IDE_PIO_TIMING 0x40 |
15 | #define ATIIXP_IDE_MDMA_TIMING 0x44 | 17 | #define ATIIXP_IDE_MDMA_TIMING 0x44 |
16 | #define ATIIXP_IDE_PIO_CONTROL 0x48 | 18 | #define ATIIXP_IDE_PIO_CONTROL 0x48 |
@@ -137,16 +139,17 @@ static const struct ide_port_ops atiixp_port_ops = { | |||
137 | }; | 139 | }; |
138 | 140 | ||
139 | static const struct ide_port_info atiixp_pci_info[] __devinitdata = { | 141 | static const struct ide_port_info atiixp_pci_info[] __devinitdata = { |
140 | { /* 0 */ | 142 | { /* 0: IXP200/300/400/700 */ |
141 | .name = "ATIIXP", | 143 | .name = DRV_NAME, |
142 | .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}}, | 144 | .enablebits = {{0x48,0x01,0x00}, {0x48,0x08,0x00}}, |
143 | .port_ops = &atiixp_port_ops, | 145 | .port_ops = &atiixp_port_ops, |
144 | .host_flags = IDE_HFLAG_LEGACY_IRQS, | 146 | .host_flags = IDE_HFLAG_LEGACY_IRQS, |
145 | .pio_mask = ATA_PIO4, | 147 | .pio_mask = ATA_PIO4, |
146 | .mwdma_mask = ATA_MWDMA2, | 148 | .mwdma_mask = ATA_MWDMA2, |
147 | .udma_mask = ATA_UDMA5, | 149 | .udma_mask = ATA_UDMA5, |
148 | },{ /* 1 */ | 150 | }, |
149 | .name = "SB600_PATA", | 151 | { /* 1: IXP600 */ |
152 | .name = DRV_NAME, | ||
150 | .enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}}, | 153 | .enablebits = {{0x48,0x01,0x00}, {0x00,0x00,0x00}}, |
151 | .port_ops = &atiixp_port_ops, | 154 | .port_ops = &atiixp_port_ops, |
152 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_LEGACY_IRQS, | 155 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_LEGACY_IRQS, |
@@ -167,7 +170,7 @@ static const struct ide_port_info atiixp_pci_info[] __devinitdata = { | |||
167 | 170 | ||
168 | static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 171 | static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
169 | { | 172 | { |
170 | return ide_setup_pci_device(dev, &atiixp_pci_info[id->driver_data]); | 173 | return ide_pci_init_one(dev, &atiixp_pci_info[id->driver_data], NULL); |
171 | } | 174 | } |
172 | 175 | ||
173 | static const struct pci_device_id atiixp_pci_tbl[] = { | 176 | static const struct pci_device_id atiixp_pci_tbl[] = { |
@@ -184,6 +187,7 @@ static struct pci_driver driver = { | |||
184 | .name = "ATIIXP_IDE", | 187 | .name = "ATIIXP_IDE", |
185 | .id_table = atiixp_pci_tbl, | 188 | .id_table = atiixp_pci_tbl, |
186 | .probe = atiixp_init_one, | 189 | .probe = atiixp_init_one, |
190 | .remove = ide_pci_remove, | ||
187 | }; | 191 | }; |
188 | 192 | ||
189 | static int __init atiixp_ide_init(void) | 193 | static int __init atiixp_ide_init(void) |
@@ -191,7 +195,13 @@ static int __init atiixp_ide_init(void) | |||
191 | return ide_pci_register_driver(&driver); | 195 | return ide_pci_register_driver(&driver); |
192 | } | 196 | } |
193 | 197 | ||
198 | static void __exit atiixp_ide_exit(void) | ||
199 | { | ||
200 | pci_unregister_driver(&driver); | ||
201 | } | ||
202 | |||
194 | module_init(atiixp_ide_init); | 203 | module_init(atiixp_ide_init); |
204 | module_exit(atiixp_ide_exit); | ||
195 | 205 | ||
196 | MODULE_AUTHOR("HUI YU"); | 206 | MODULE_AUTHOR("HUI YU"); |
197 | MODULE_DESCRIPTION("PCI driver module for ATI IXP IDE"); | 207 | MODULE_DESCRIPTION("PCI driver module for ATI IXP IDE"); |