diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-12-08 05:39:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:29:03 -0500 |
commit | b1489009963b8c5132f2ffe23483e811d9ae5607 (patch) | |
tree | 66f8ada358e6e42dc7a65e3f7ed662d5bfc0d32a /drivers/ide/pci/alim15x3.c | |
parent | 6b49a257850fb8ad91f4c76bb712e9213141a34a (diff) |
[PATCH] ide: more conversion to pci_get APIs
This completes IDE except for one use which requires a new core PCI function
and will be polished up at the end
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/ide/pci/alim15x3.c')
-rw-r--r-- | drivers/ide/pci/alim15x3.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index d419e4bb54f4..89109be5162c 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -586,11 +586,11 @@ static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c | |||
586 | { | 586 | { |
587 | unsigned long flags; | 587 | unsigned long flags; |
588 | u8 tmpbyte; | 588 | u8 tmpbyte; |
589 | struct pci_dev *north = pci_find_slot(0, PCI_DEVFN(0,0)); | 589 | struct pci_dev *north = pci_get_slot(dev->bus, PCI_DEVFN(0,0)); |
590 | 590 | ||
591 | pci_read_config_byte(dev, PCI_REVISION_ID, &m5229_revision); | 591 | pci_read_config_byte(dev, PCI_REVISION_ID, &m5229_revision); |
592 | 592 | ||
593 | isa_dev = pci_find_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL); | 593 | isa_dev = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL); |
594 | 594 | ||
595 | #if defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_PROC_FS) | 595 | #if defined(DISPLAY_ALI_TIMINGS) && defined(CONFIG_PROC_FS) |
596 | if (!ali_proc) { | 596 | if (!ali_proc) { |
@@ -613,8 +613,7 @@ static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c | |||
613 | * clear bit 7 | 613 | * clear bit 7 |
614 | */ | 614 | */ |
615 | pci_write_config_byte(dev, 0x4b, tmpbyte & 0x7F); | 615 | pci_write_config_byte(dev, 0x4b, tmpbyte & 0x7F); |
616 | local_irq_restore(flags); | 616 | goto out; |
617 | return 0; | ||
618 | } | 617 | } |
619 | 618 | ||
620 | /* | 619 | /* |
@@ -637,10 +636,8 @@ static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c | |||
637 | * box without a device at 0:0.0. The ALi bridge will be at | 636 | * box without a device at 0:0.0. The ALi bridge will be at |
638 | * 0:0.0 so if we didn't find one we know what is cooking. | 637 | * 0:0.0 so if we didn't find one we know what is cooking. |
639 | */ | 638 | */ |
640 | if (north && north->vendor != PCI_VENDOR_ID_AL) { | 639 | if (north && north->vendor != PCI_VENDOR_ID_AL) |
641 | local_irq_restore(flags); | 640 | goto out; |
642 | return 0; | ||
643 | } | ||
644 | 641 | ||
645 | if (m5229_revision < 0xC5 && isa_dev) | 642 | if (m5229_revision < 0xC5 && isa_dev) |
646 | { | 643 | { |
@@ -661,6 +658,9 @@ static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const c | |||
661 | pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02); | 658 | pci_write_config_byte(isa_dev, 0x79, tmpbyte | 0x02); |
662 | } | 659 | } |
663 | } | 660 | } |
661 | out: | ||
662 | pci_dev_put(north); | ||
663 | pci_dev_put(isa_dev); | ||
664 | local_irq_restore(flags); | 664 | local_irq_restore(flags); |
665 | return 0; | 665 | return 0; |
666 | } | 666 | } |