aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/cs5530.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-07-27 11:25:57 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-27 11:25:57 -0400
commit50cb993ea6cd187bfed085cb3e0747066edeb02f (patch)
tree61edac62c6c5bc07c59e4369c50c6821ad77f2c0 /drivers/ide/pci/cs5530.c
parent445c2714cf72817ab1ad3ca894c6d9b2047b3a3e (diff)
parent8be1a6d6c77ab4532e4476fdb8177030ef48b52c (diff)
Merge ../linux-2.6
Diffstat (limited to 'drivers/ide/pci/cs5530.c')
-rw-r--r--drivers/ide/pci/cs5530.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c
index f5534c1ff349..f235db8c678b 100644
--- a/drivers/ide/pci/cs5530.c
+++ b/drivers/ide/pci/cs5530.c
@@ -22,6 +22,8 @@
22 22
23#include <asm/io.h> 23#include <asm/io.h>
24 24
25#define DRV_NAME "cs5530"
26
25/* 27/*
26 * Here are the standard PIO mode 0-4 timings for each "format". 28 * Here are the standard PIO mode 0-4 timings for each "format".
27 * Format-0 uses fast data reg timings, with slower command reg timings. 29 * Format-0 uses fast data reg timings, with slower command reg timings.
@@ -127,12 +129,11 @@ static void cs5530_set_dma_mode(ide_drive_t *drive, const u8 mode)
127/** 129/**
128 * init_chipset_5530 - set up 5530 bridge 130 * init_chipset_5530 - set up 5530 bridge
129 * @dev: PCI device 131 * @dev: PCI device
130 * @name: device name
131 * 132 *
132 * Initialize the cs5530 bridge for reliable IDE DMA operation. 133 * Initialize the cs5530 bridge for reliable IDE DMA operation.
133 */ 134 */
134 135
135static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const char *name) 136static unsigned int __devinit init_chipset_cs5530(struct pci_dev *dev)
136{ 137{
137 struct pci_dev *master_0 = NULL, *cs5530_0 = NULL; 138 struct pci_dev *master_0 = NULL, *cs5530_0 = NULL;
138 139
@@ -151,11 +152,11 @@ static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const ch
151 } 152 }
152 } 153 }
153 if (!master_0) { 154 if (!master_0) {
154 printk(KERN_ERR "%s: unable to locate PCI MASTER function\n", name); 155 printk(KERN_ERR DRV_NAME ": unable to locate PCI MASTER function\n");
155 goto out; 156 goto out;
156 } 157 }
157 if (!cs5530_0) { 158 if (!cs5530_0) {
158 printk(KERN_ERR "%s: unable to locate CS5530 LEGACY function\n", name); 159 printk(KERN_ERR DRV_NAME ": unable to locate CS5530 LEGACY function\n");
159 goto out; 160 goto out;
160 } 161 }
161 162
@@ -243,7 +244,7 @@ static const struct ide_port_ops cs5530_port_ops = {
243}; 244};
244 245
245static const struct ide_port_info cs5530_chipset __devinitdata = { 246static const struct ide_port_info cs5530_chipset __devinitdata = {
246 .name = "CS5530", 247 .name = DRV_NAME,
247 .init_chipset = init_chipset_cs5530, 248 .init_chipset = init_chipset_cs5530,
248 .init_hwif = init_hwif_cs5530, 249 .init_hwif = init_hwif_cs5530,
249 .port_ops = &cs5530_port_ops, 250 .port_ops = &cs5530_port_ops,
@@ -256,7 +257,7 @@ static const struct ide_port_info cs5530_chipset __devinitdata = {
256 257
257static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id) 258static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id)
258{ 259{
259 return ide_setup_pci_device(dev, &cs5530_chipset); 260 return ide_pci_init_one(dev, &cs5530_chipset, NULL);
260} 261}
261 262
262static const struct pci_device_id cs5530_pci_tbl[] = { 263static const struct pci_device_id cs5530_pci_tbl[] = {
@@ -269,6 +270,7 @@ static struct pci_driver driver = {
269 .name = "CS5530 IDE", 270 .name = "CS5530 IDE",
270 .id_table = cs5530_pci_tbl, 271 .id_table = cs5530_pci_tbl,
271 .probe = cs5530_init_one, 272 .probe = cs5530_init_one,
273 .remove = ide_pci_remove,
272}; 274};
273 275
274static int __init cs5530_ide_init(void) 276static int __init cs5530_ide_init(void)
@@ -276,7 +278,13 @@ static int __init cs5530_ide_init(void)
276 return ide_pci_register_driver(&driver); 278 return ide_pci_register_driver(&driver);
277} 279}
278 280
281static void __exit cs5530_ide_exit(void)
282{
283 pci_unregister_driver(&driver);
284}
285
279module_init(cs5530_ide_init); 286module_init(cs5530_ide_init);
287module_exit(cs5530_ide_exit);
280 288
281MODULE_AUTHOR("Mark Lord"); 289MODULE_AUTHOR("Mark Lord");
282MODULE_DESCRIPTION("PCI driver module for Cyrix/NS 5530 IDE"); 290MODULE_DESCRIPTION("PCI driver module for Cyrix/NS 5530 IDE");