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
/
alim15x3.c
diff --git
a/drivers/ide/pci/alim15x3.c
b/drivers/ide/pci/alim15x3.c
index
e15948b
..
68df77e
100644
(file)
--- a/
drivers/ide/pci/alim15x3.c
+++ b/
drivers/ide/pci/alim15x3.c
@@
-27,7
+27,6
@@
*
*/
*
*/
-#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>
@@
-587,11
+586,11
@@
static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c
{
unsigned long flags;
u8 tmpbyte;
{
unsigned long flags;
u8 tmpbyte;
- struct pci_dev *north = pci_
find_slot(0
, PCI_DEVFN(0,0));
+ struct pci_dev *north = pci_
get_slot(dev->bus
, PCI_DEVFN(0,0));
pci_read_config_byte(dev, PCI_REVISION_ID, &m5229_revision);
pci_read_config_byte(dev, PCI_REVISION_ID, &m5229_revision);
- isa_dev = pci_
find
_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL);
+ isa_dev = pci_
get
_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL);
#if defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_PROC_FS)
if (!ali_proc) {
#if defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_PROC_FS)
if (!ali_proc) {
@@
-614,8
+613,7
@@
static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c
* clear bit 7
*/
pci_write_config_byte(dev, 0x4b, tmpbyte & 0x7F);
* clear bit 7
*/
pci_write_config_byte(dev, 0x4b, tmpbyte & 0x7F);
- local_irq_restore(flags);
- return 0;
+ goto out;
}
/*
}
/*
@@
-638,10
+636,8
@@
static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c
* box without a device at 0:0.0. The ALi bridge will be at
* 0:0.0 so if we didn't find one we know what is cooking.
*/
* box without a device at 0:0.0. The ALi bridge will be at
* 0:0.0 so if we didn't find one we know what is cooking.
*/
- if (north && north->vendor != PCI_VENDOR_ID_AL) {
- local_irq_restore(flags);
- return 0;
- }
+ if (north && north->vendor != PCI_VENDOR_ID_AL)
+ goto out;
if (m5229_revision < 0xC5 && isa_dev)
{
if (m5229_revision < 0xC5 && isa_dev)
{
@@
-662,6
+658,9
@@
static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c
pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02);
}
}
pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02);
}
}
+out:
+ pci_dev_put(north);
+ pci_dev_put(isa_dev);
local_irq_restore(flags);
return 0;
}
local_irq_restore(flags);
return 0;
}
@@
-908,7
+907,7
@@
static struct pci_driver driver = {
.probe = alim15x3_init_one,
};
.probe = alim15x3_init_one,
};
-static int ali15x3_ide_init(void)
+static int
__init
ali15x3_ide_init(void)
{
return ide_pci_register_driver(&driver);
}
{
return ide_pci_register_driver(&driver);
}