diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2014-11-01 11:54:55 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-11-11 16:31:11 -0500 |
commit | 85eb92e81801d64686eb78928d500a4c83ee9623 (patch) | |
tree | aab5da45bc8861ab3882658922a0aa974f39e0f8 /drivers/bcma/driver_mips.c | |
parent | 6164c202289f4718acf00c0dbe5f130b07330ab2 (diff) |
bcma: make it possible to specify a IRQ num in bcma_core_irq()
This moves bcma_core_irq() to main.c and add a extra parameter with a
number so that we can return different irq number for devices with more
than one.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma/driver_mips.c')
-rw-r--r-- | drivers/bcma/driver_mips.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c index 004d6aa671ce..5ec69c3d409d 100644 --- a/drivers/bcma/driver_mips.c +++ b/drivers/bcma/driver_mips.c | |||
@@ -115,7 +115,7 @@ static u32 bcma_core_mips_irqflag(struct bcma_device *dev) | |||
115 | * If disabled, 5 is returned. | 115 | * If disabled, 5 is returned. |
116 | * If not supported, 6 is returned. | 116 | * If not supported, 6 is returned. |
117 | */ | 117 | */ |
118 | static unsigned int bcma_core_mips_irq(struct bcma_device *dev) | 118 | unsigned int bcma_core_mips_irq(struct bcma_device *dev) |
119 | { | 119 | { |
120 | struct bcma_device *mdev = dev->bus->drv_mips.core; | 120 | struct bcma_device *mdev = dev->bus->drv_mips.core; |
121 | u32 irqflag; | 121 | u32 irqflag; |
@@ -133,13 +133,6 @@ static unsigned int bcma_core_mips_irq(struct bcma_device *dev) | |||
133 | return 5; | 133 | return 5; |
134 | } | 134 | } |
135 | 135 | ||
136 | unsigned int bcma_core_irq(struct bcma_device *dev) | ||
137 | { | ||
138 | unsigned int mips_irq = bcma_core_mips_irq(dev); | ||
139 | return mips_irq <= 4 ? mips_irq + 2 : 0; | ||
140 | } | ||
141 | EXPORT_SYMBOL(bcma_core_irq); | ||
142 | |||
143 | static void bcma_core_mips_set_irq(struct bcma_device *dev, unsigned int irq) | 136 | static void bcma_core_mips_set_irq(struct bcma_device *dev, unsigned int irq) |
144 | { | 137 | { |
145 | unsigned int oldirq = bcma_core_mips_irq(dev); | 138 | unsigned int oldirq = bcma_core_mips_irq(dev); |
@@ -423,7 +416,7 @@ void bcma_core_mips_init(struct bcma_drv_mips *mcore) | |||
423 | break; | 416 | break; |
424 | default: | 417 | default: |
425 | list_for_each_entry(core, &bus->cores, list) { | 418 | list_for_each_entry(core, &bus->cores, list) { |
426 | core->irq = bcma_core_irq(core); | 419 | core->irq = bcma_core_irq(core, 0); |
427 | } | 420 | } |
428 | bcma_err(bus, | 421 | bcma_err(bus, |
429 | "Unknown device (0x%x) found, can not configure IRQs\n", | 422 | "Unknown device (0x%x) found, can not configure IRQs\n", |