linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] langwell_gpio: fix CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED build
@ 2011-03-14 10:46 Lennert Buytenhek
  0 siblings, 0 replies; only message in thread
From: Lennert Buytenhek @ 2011-03-14 10:46 UTC (permalink / raw)
  To: Grant Likely, linux-kernel
  Cc: Stephen Rothwell, linux-next, Paul Mackerras, linuxppc-dev

When CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED is defined, struct irq_desc
no longer contains a ->chip member pointing to the corresponding struct
irq_chip, leading to the following build error:

	drivers/gpio/langwell_gpio.c: In function 'lnw_irq_handler':
	drivers/gpio/langwell_gpio.c:210: error: 'struct irq_desc' has no member named 'chip'
	drivers/gpio/langwell_gpio.c:211: error: 'struct irq_desc' has no member named 'chip'

Fix this up by using get_irq_desc_chip(desc) to get the irq_chip,
instead of trying to get it via desc->chip directly.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>

diff --git a/drivers/gpio/langwell_gpio.c b/drivers/gpio/langwell_gpio.c
index 54d70a4..56eb66a 100644
--- a/drivers/gpio/langwell_gpio.c
+++ b/drivers/gpio/langwell_gpio.c
@@ -191,6 +191,7 @@ static void lnw_irq_handler(unsigned irq, struct irq_desc *desc)
 	u32 base, gpio;
 	void __iomem *gedr;
 	u32 gedr_v;
+	struct irq_chip *chip;
 
 	/* check GPIO controller to check which pin triggered the interrupt */
 	for (base = 0; base < lnw->chip.ngpio; base += 32) {
@@ -207,8 +208,9 @@ static void lnw_irq_handler(unsigned irq, struct irq_desc *desc)
 		writel(gedr_v, gedr);
 	}
 
-	if (desc->chip->irq_eoi)
-		desc->chip->irq_eoi(irq_get_irq_data(irq));
+	chip = get_irq_desc_chip(desc);
+	if (chip->irq_eoi)
+		chip->irq_eoi(irq_get_irq_data(irq));
 	else
 		dev_warn(lnw->chip.dev, "missing EOI handler for irq %d\n", irq);
 
---

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-03-14 10:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-14 10:46 [PATCH] langwell_gpio: fix CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED build Lennert Buytenhek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).