Skip to content

Commit

Permalink
gpio: pl061: irq_data conversion
Browse files Browse the repository at this point in the history
Converts irq_chips and flow handlers over to the new struct irq_data based
irq_chip functions.

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Lennert Buytenhek authored and Linus Torvalds committed Jan 13, 2011
1 parent 6f5cfc0 commit b222186
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions drivers/gpio/pl061.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ static int pl061_to_irq(struct gpio_chip *gc, unsigned offset)
/*
* PL061 GPIO IRQ
*/
static void pl061_irq_disable(unsigned irq)
static void pl061_irq_disable(struct irq_data *d)
{
struct pl061_gpio *chip = get_irq_chip_data(irq);
int offset = irq - chip->irq_base;
struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
int offset = d->irq - chip->irq_base;
unsigned long flags;
u8 gpioie;

Expand All @@ -143,10 +143,10 @@ static void pl061_irq_disable(unsigned irq)
spin_unlock_irqrestore(&chip->irq_lock, flags);
}

static void pl061_irq_enable(unsigned irq)
static void pl061_irq_enable(struct irq_data *d)
{
struct pl061_gpio *chip = get_irq_chip_data(irq);
int offset = irq - chip->irq_base;
struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
int offset = d->irq - chip->irq_base;
unsigned long flags;
u8 gpioie;

Expand All @@ -157,10 +157,10 @@ static void pl061_irq_enable(unsigned irq)
spin_unlock_irqrestore(&chip->irq_lock, flags);
}

static int pl061_irq_type(unsigned irq, unsigned trigger)
static int pl061_irq_type(struct irq_data *d, unsigned trigger)
{
struct pl061_gpio *chip = get_irq_chip_data(irq);
int offset = irq - chip->irq_base;
struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
int offset = d->irq - chip->irq_base;
unsigned long flags;
u8 gpiois, gpioibe, gpioiev;

Expand Down Expand Up @@ -203,9 +203,9 @@ static int pl061_irq_type(unsigned irq, unsigned trigger)

static struct irq_chip pl061_irqchip = {
.name = "GPIO",
.enable = pl061_irq_enable,
.disable = pl061_irq_disable,
.set_type = pl061_irq_type,
.irq_enable = pl061_irq_enable,
.irq_disable = pl061_irq_disable,
.irq_set_type = pl061_irq_type,
};

static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
Expand All @@ -214,7 +214,7 @@ static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
struct list_head *ptr;
struct pl061_gpio *chip;

desc->chip->ack(irq);
desc->irq_data.chip->irq_ack(&desc->irq_data);
list_for_each(ptr, chip_list) {
unsigned long pending;
int offset;
Expand All @@ -229,7 +229,7 @@ static void pl061_irq_handler(unsigned irq, struct irq_desc *desc)
for_each_set_bit(offset, &pending, PL061_GPIO_NR)
generic_handle_irq(pl061_to_irq(&chip->gc, offset));
}
desc->chip->unmask(irq);
desc->irq_data.chip->irq_unmask(&desc->irq_data);
}

static int pl061_probe(struct amba_device *dev, struct amba_id *id)
Expand Down

0 comments on commit b222186

Please sign in to comment.