89ab5ace6958950b95c58cf1733d33b277092fbf
[openwrt/svn-archive/archive.git] / target / linux / ar71xx / patches-3.7 / 169-MIPS-ath79-allow-to-specify-bus-number-in-PCI-IRQ-ma.patch
1 From 12c68e4fccadc22a0470177141a57892a76e4a2b Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Sun, 24 Jun 2012 15:33:16 +0200
4 Subject: [PATCH 25/34] MIPS: ath79: allow to specify bus number in PCI IRQ maps
5
6 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
7 ---
8 arch/mips/ath79/pci.c | 4 +++-
9 arch/mips/ath79/pci.h | 1 +
10 2 files changed, 4 insertions(+), 1 deletions(-)
11
12 --- a/arch/mips/ath79/pci.c
13 +++ b/arch/mips/ath79/pci.c
14 @@ -75,7 +75,9 @@ int __init pcibios_map_irq(const struct
15 const struct ath79_pci_irq *entry;
16
17 entry = &ath79_pci_irq_map[i];
18 - if (entry->slot == slot && entry->pin == pin) {
19 + if (entry->bus == dev->bus->number &&
20 + entry->slot == slot &&
21 + entry->pin == pin) {
22 irq = entry->irq;
23 break;
24 }
25 --- a/arch/mips/ath79/pci.h
26 +++ b/arch/mips/ath79/pci.h
27 @@ -14,6 +14,7 @@
28 #define _ATH79_PCI_H
29
30 struct ath79_pci_irq {
31 + int bus;
32 u8 slot;
33 u8 pin;
34 int irq;