Skip to content

Commit 07f56e6

Browse files
author
Russell King
committed
ARM: locomo: fix locomo irq handling
Accidentally booting Collie on Assabet reveals that the locomo driver incorrectly overwrites gpio-sa1100's chip data for its parent interrupt, leading to oops in sa1100_gpio_unmask() and sa1100_update_edge_regs() when "gpio: sa1100: convert to use IO accessors" is applied. Fix locomo to use the handler data rather than chip data for its parent interrupt. Signed-off-by: Russell King <[email protected]>
1 parent 6b3142b commit 07f56e6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

arch/arm/common/locomo.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static struct locomo_dev_info locomo_devices[] = {
140140

141141
static void locomo_handler(struct irq_desc *desc)
142142
{
143-
struct locomo *lchip = irq_desc_get_chip_data(desc);
143+
struct locomo *lchip = irq_desc_get_handler_data(desc);
144144
int req, i;
145145

146146
/* Acknowledge the parent IRQ */
@@ -200,8 +200,7 @@ static void locomo_setup_irq(struct locomo *lchip)
200200
* Install handler for IRQ_LOCOMO_HW.
201201
*/
202202
irq_set_irq_type(lchip->irq, IRQ_TYPE_EDGE_FALLING);
203-
irq_set_chip_data(lchip->irq, lchip);
204-
irq_set_chained_handler(lchip->irq, locomo_handler);
203+
irq_set_chained_handler_and_data(lchip->irq, locomo_handler, lchip);
205204

206205
/* Install handlers for IRQ_LOCOMO_* */
207206
for ( ; irq <= lchip->irq_base + 3; irq++) {

0 commit comments

Comments
 (0)