git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git]
/
drivers
/
ide
/
pci
/
cs5530.c
diff --git
a/drivers/ide/pci/cs5530.c
b/drivers/ide/pci/cs5530.c
index
0381961
..
9bf5fdf
100644
(file)
--- a/
drivers/ide/pci/cs5530.c
+++ b/
drivers/ide/pci/cs5530.c
@@
-14,7
+14,6
@@
* CS5530 documentation available from National Semiconductor.
*/
* CS5530 documentation available from National Semiconductor.
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
@@
-217,29
+216,29
@@
static int cs5530_config_dma (ide_drive_t *drive)
* Initialize the cs5530 bridge for reliable IDE DMA operation.
*/
* Initialize the cs5530 bridge for reliable IDE DMA operation.
*/
-static unsigned int __init init_chipset_cs5530 (struct pci_dev *dev, const char *name)
+static unsigned int __
dev
init init_chipset_cs5530 (struct pci_dev *dev, const char *name)
{
struct pci_dev *master_0 = NULL, *cs5530_0 = NULL;
unsigned long flags;
dev = NULL;
{
struct pci_dev *master_0 = NULL, *cs5530_0 = NULL;
unsigned long flags;
dev = NULL;
- while ((dev = pci_
find
_device(PCI_VENDOR_ID_CYRIX, PCI_ANY_ID, dev)) != NULL) {
+ while ((dev = pci_
get
_device(PCI_VENDOR_ID_CYRIX, PCI_ANY_ID, dev)) != NULL) {
switch (dev->device) {
case PCI_DEVICE_ID_CYRIX_PCI_MASTER:
switch (dev->device) {
case PCI_DEVICE_ID_CYRIX_PCI_MASTER:
- master_0 =
dev
;
+ master_0 =
pci_dev_get(dev)
;
break;
case PCI_DEVICE_ID_CYRIX_5530_LEGACY:
break;
case PCI_DEVICE_ID_CYRIX_5530_LEGACY:
- cs5530_0 =
dev
;
+ cs5530_0 =
pci_dev_get(dev)
;
break;
}
}
if (!master_0) {
printk(KERN_ERR "%s: unable to locate PCI MASTER function\n", name);
break;
}
}
if (!master_0) {
printk(KERN_ERR "%s: unable to locate PCI MASTER function\n", name);
-
return 0
;
+
goto out
;
}
if (!cs5530_0) {
printk(KERN_ERR "%s: unable to locate CS5530 LEGACY function\n", name);
}
if (!cs5530_0) {
printk(KERN_ERR "%s: unable to locate CS5530 LEGACY function\n", name);
-
return 0
;
+
goto out
;
}
spin_lock_irqsave(&ide_lock, flags);
}
spin_lock_irqsave(&ide_lock, flags);
@@
-297,6
+296,9
@@
static unsigned int __init init_chipset_cs5530 (struct pci_dev *dev, const char
spin_unlock_irqrestore(&ide_lock, flags);
spin_unlock_irqrestore(&ide_lock, flags);
+out:
+ pci_dev_put(master_0);
+ pci_dev_put(cs5530_0);
return 0;
}
return 0;
}
@@
-308,7
+310,7
@@
static unsigned int __init init_chipset_cs5530 (struct pci_dev *dev, const char
* performs channel-specific pre-initialization before drive probing.
*/
* performs channel-specific pre-initialization before drive probing.
*/
-static void __init init_hwif_cs5530 (ide_hwif_t *hwif)
+static void __
dev
init init_hwif_cs5530 (ide_hwif_t *hwif)
{
unsigned long basereg;
u32 d0_timings;
{
unsigned long basereg;
u32 d0_timings;
@@
-372,7
+374,7
@@
static struct pci_driver driver = {
.probe = cs5530_init_one,
};
.probe = cs5530_init_one,
};
-static int cs5530_ide_init(void)
+static int
__init
cs5530_ide_init(void)
{
return ide_pci_register_driver(&driver);
}
{
return ide_pci_register_driver(&driver);
}