Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242448
b: refs/heads/master
c: cd11d14
h: refs/heads/master
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Ralf Baechle committed Mar 25, 2011
1 parent d192c9c commit 195d6cd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 42b64f388c171a7a1a8962d93d9bae2c04da7738
refs/heads/master: cd11d14de91809ff3a150f823965a5b4209cad84
25 changes: 13 additions & 12 deletions trunk/arch/mips/jz4740/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ struct jz_gpio_chip {
spinlock_t lock;

struct gpio_chip gpio_chip;
struct irq_chip irq_chip;
struct sys_device sysdev;
};

Expand Down Expand Up @@ -435,6 +434,17 @@ static int jz_gpio_irq_set_wake(struct irq_data *data, unsigned int on)
return 0;
}

static struct irq_chip jz_gpio_irq_chip = {
.name = "GPIO",
.irq_mask = jz_gpio_irq_mask,
.irq_unmask = jz_gpio_irq_unmask,
.irq_ack = jz_gpio_irq_ack,
.irq_startup = jz_gpio_irq_startup,
.irq_shutdown = jz_gpio_irq_shutdown,
.irq_set_type = jz_gpio_irq_set_type,
.irq_set_wake = jz_gpio_irq_set_wake,
};

/*
* This lock class tells lockdep that GPIO irqs are in a different
* category than their parents, so it won't report false recursion.
Expand All @@ -453,16 +463,6 @@ static struct lock_class_key gpio_lock_class;
.base = JZ4740_GPIO_BASE_ ## _bank, \
.ngpio = JZ4740_GPIO_NUM_ ## _bank, \
}, \
.irq_chip = { \
.name = "GPIO Bank " # _bank, \
.irq_mask = jz_gpio_irq_mask, \
.irq_unmask = jz_gpio_irq_unmask, \
.irq_ack = jz_gpio_irq_ack, \
.irq_startup = jz_gpio_irq_startup, \
.irq_shutdown = jz_gpio_irq_shutdown, \
.irq_set_type = jz_gpio_irq_set_type, \
.irq_set_wake = jz_gpio_irq_set_wake, \
}, \
}

static struct jz_gpio_chip jz4740_gpio_chips[] = {
Expand Down Expand Up @@ -529,7 +529,8 @@ static int jz4740_gpio_chip_init(struct jz_gpio_chip *chip, unsigned int id)
for (irq = chip->irq_base; irq < chip->irq_base + chip->gpio_chip.ngpio; ++irq) {
lockdep_set_class(&irq_desc[irq].lock, &gpio_lock_class);
set_irq_chip_data(irq, chip);
set_irq_chip_and_handler(irq, &chip->irq_chip, handle_level_irq);
set_irq_chip_and_handler(irq, &jz_gpio_irq_chip,
handle_level_irq);
}

return 0;
Expand Down

0 comments on commit 195d6cd

Please sign in to comment.