[patch 03/23] arm: Use genirq lockdep helper to set lock class

From: Thomas Gleixner
Date: Fri Mar 25 2011 - 09:26:55 EST


Remove the open coded access to irq_desc which will fail on sparse irq
and use the proper wrappers.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
arch/arm/mach-at91/gpio.c | 2 +-
arch/arm/mach-tegra/gpio.c | 2 +-
arch/arm/plat-omap/gpio.c | 4 +---
3 files changed, 3 insertions(+), 5 deletions(-)

Index: linux-2.6-tip/arch/arm/mach-at91/gpio.c
===================================================================
--- linux-2.6-tip.orig/arch/arm/mach-at91/gpio.c
+++ linux-2.6-tip/arch/arm/mach-at91/gpio.c
@@ -518,7 +518,7 @@ void __init at91_gpio_irq_setup(void)
__raw_writel(~0, this->regbase + PIO_IDR);

for (i = 0, pin = this->chip.base; i < 32; i++, pin++) {
- lockdep_set_class(&irq_desc[pin].lock, &gpio_lock_class);
+ irq_set_lockdep_class(pin, &gpio_lock_class);

/*
* Can use the "simple" and not "edge" handler since it's
Index: linux-2.6-tip/arch/arm/mach-tegra/gpio.c
===================================================================
--- linux-2.6-tip.orig/arch/arm/mach-tegra/gpio.c
+++ linux-2.6-tip/arch/arm/mach-tegra/gpio.c
@@ -296,7 +296,7 @@ static int __init tegra_gpio_init(void)
for (i = INT_GPIO_BASE; i < (INT_GPIO_BASE + TEGRA_NR_GPIOS); i++) {
bank = &tegra_gpio_banks[GPIO_BANK(irq_to_gpio(i))];

- lockdep_set_class(&irq_desc[i].lock, &gpio_lock_class);
+ irq_set_lockdep_class(i, &gpio_lock_class);
set_irq_chip_data(i, bank);
set_irq_chip(i, &tegra_gpio_irq_chip);
set_irq_handler(i, handle_simple_irq);
Index: linux-2.6-tip/arch/arm/plat-omap/gpio.c
===================================================================
--- linux-2.6-tip.orig/arch/arm/plat-omap/gpio.c
+++ linux-2.6-tip/arch/arm/plat-omap/gpio.c
@@ -1672,9 +1672,7 @@ static void __init omap_gpio_chip_init(s

for (j = bank->virtual_irq_start;
j < bank->virtual_irq_start + bank_width; j++) {
- struct irq_desc *d = irq_to_desc(j);
-
- lockdep_set_class(&d->lock, &gpio_lock_class);
+ irq_set_lockdep_class(j, &gpio_lock_class);
set_irq_chip_data(j, bank);
if (bank_is_mpuio(bank))
set_irq_chip(j, &mpuio_irq_chip);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/