diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 17:55:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 17:55:09 -0400 |
commit | b5684b83b1e1579bbbc80e703e990c0cccf5892c (patch) | |
tree | 3f1b62b2320bce4d658d2ad0d4b77856499ac533 /drivers/ide/pci/cs5530.c | |
parent | 1481b9109fe771ec8b035d7760f42e36d2bed5d4 (diff) | |
parent | 1b8ebad87b459e2e1333fbf28005977245ff5402 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (76 commits)
ide: use proper printk() KERN_* levels in ide-probe.c
ide: fix for EATA SCSI HBA in ATA emulating mode
ide: remove stale comments from drivers/ide/Makefile
ide: enable local IRQs in all handlers for TASKFILE_NO_DATA data phase
ide-scsi: remove kmalloced struct request
ht6560b: remove old history
ht6560b: update email address
ide-cd: fix oops when using growisofs
gayle: release resources on ide_host_add() failure
palm_bk3710: add UltraDMA/100 support
ide: trivial sparse annotations
ide: ide-tape.c sparse annotations and unaligned access removal
ide: drop 'name' parameter from ->init_chipset method
ide: prefix messages from IDE PCI host drivers by driver name
it821x: remove DECLARE_ITE_DEV() macro
it8213: remove DECLARE_ITE_DEV() macro
ide: include PCI device name in messages from IDE PCI host drivers
ide: remove <asm/ide.h> for some archs
ide-generic: remove ide_default_{io_base,irq}() inlines (take 3)
ide-generic: is no longer needed on ppc32
...
Diffstat (limited to 'drivers/ide/pci/cs5530.c')
-rw-r--r-- | drivers/ide/pci/cs5530.c | 20 |
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 | ||
135 | static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const char *name) | 136 | static 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 | ||
245 | static const struct ide_port_info cs5530_chipset __devinitdata = { | 246 | static 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 | ||
257 | static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 258 | static 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 | ||
262 | static const struct pci_device_id cs5530_pci_tbl[] = { | 263 | static 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 | ||
274 | static int __init cs5530_ide_init(void) | 276 | static 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 | ||
281 | static void __exit cs5530_ide_exit(void) | ||
282 | { | ||
283 | pci_unregister_driver(&driver); | ||
284 | } | ||
285 | |||
279 | module_init(cs5530_ide_init); | 286 | module_init(cs5530_ide_init); |
287 | module_exit(cs5530_ide_exit); | ||
280 | 288 | ||
281 | MODULE_AUTHOR("Mark Lord"); | 289 | MODULE_AUTHOR("Mark Lord"); |
282 | MODULE_DESCRIPTION("PCI driver module for Cyrix/NS 5530 IDE"); | 290 | MODULE_DESCRIPTION("PCI driver module for Cyrix/NS 5530 IDE"); |