All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] intel_pmic_gpio: modify EOI handling following change of kernel irq subsystem
@ 2010-12-30  9:32 Feng Tang
  2010-12-30 13:41 ` Matthew Garrett
  0 siblings, 1 reply; 4+ messages in thread
From: Feng Tang @ 2010-12-30  9:32 UTC (permalink / raw)
  To: mjg59, platform-driver-x86; +Cc: alan, tglx, Feng Tang, Alek Du

Latest kernel has many changes in IRQ subsystem and its interfaces, like adding
"irq_eoi" for struct irq_chip, this patch will make it support both the new
and old interface.

Cc: Alek Du <alek.du@intel.com>
Signed-off-by: Feng Tang <feng.tang@intel.com>
---
 drivers/platform/x86/intel_pmic_gpio.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/intel_pmic_gpio.c b/drivers/platform/x86/intel_pmic_gpio.c
index e61db9d..4efb2c6 100644
--- a/drivers/platform/x86/intel_pmic_gpio.c
+++ b/drivers/platform/x86/intel_pmic_gpio.c
@@ -244,7 +244,15 @@ static void pmic_irq_handler(unsigned irq, struct irq_desc *desc)
 			generic_handle_irq(pg->irq_base + gpio);
 		}
 	}
-	desc->chip->eoi(irq);
+
+	if (desc->chip->irq_eoi)
+		desc->chip->irq_eoi(irq_get_irq_data(irq));
+#ifndef CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED
+	else if (desc->chip->eoi)
+		desc->chip->eoi(irq);
+#endif
+	else
+		dev_warn(pg->chip.dev, "missing EOI handler for irq %d\n", irq);
 }
 
 static int __devinit platform_pmic_gpio_probe(struct platform_device *pdev)
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] intel_pmic_gpio: modify EOI handling following change of kernel irq subsystem
  2010-12-30  9:32 [PATCH] intel_pmic_gpio: modify EOI handling following change of kernel irq subsystem Feng Tang
@ 2010-12-30 13:41 ` Matthew Garrett
  2010-12-31  1:48   ` Feng Tang
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Garrett @ 2010-12-30 13:41 UTC (permalink / raw)
  To: Feng Tang; +Cc: platform-driver-x86, alan, tglx, Alek Du

On Thu, Dec 30, 2010 at 05:32:54PM +0800, Feng Tang wrote:
> Latest kernel has many changes in IRQ subsystem and its interfaces, like adding
> "irq_eoi" for struct irq_chip, this patch will make it support both the new
> and old interface.

There's no point in having compatibility stubs in the mainline kernel. 
Just fix the driver up to match the new behaviour.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] intel_pmic_gpio: modify EOI handling following change of kernel irq subsystem
  2010-12-30 13:41 ` Matthew Garrett
@ 2010-12-31  1:48   ` Feng Tang
  2011-01-07 22:27     ` Matthew Garrett
  0 siblings, 1 reply; 4+ messages in thread
From: Feng Tang @ 2010-12-31  1:48 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: platform-driver-x86@vger.kernel.org, alan@linux.intel.com,
	tglx@linutronix.de, Du, Alek

On Thu, 30 Dec 2010 21:41:17 +0800
Matthew Garrett <mjg59@srcf.ucam.org> wrote:

> On Thu, Dec 30, 2010 at 05:32:54PM +0800, Feng Tang wrote:
> > Latest kernel has many changes in IRQ subsystem and its interfaces,
> > like adding "irq_eoi" for struct irq_chip, this patch will make it
> > support both the new and old interface.
> 
> There's no point in having compatibility stubs in the mainline
> kernel. Just fix the driver up to match the new behaviour.
> 

Thanks for the comments, here is the revised one

-----
From 834453fe4cb94cfcda4487ef68967037f2b5d2f2 Mon Sep 17 00:00:00 2001
From: Feng Tang <feng.tang@intel.com>
Date: Mon, 29 Nov 2010 13:39:40 +0800
Subject: [PATCH] intel_pmic_gpio: modify EOI handling following change of kernel irq subsystem

Latest kernel has many changes in IRQ subsystem and its interfaces, like adding
"irq_eoi" for struct irq_chip, this patch will make it support both the new
and old interface.

Cc: Alek Du <alek.du@intel.com>
Signed-off-by: Feng Tang <feng.tang@intel.com>
---
 drivers/platform/x86/intel_pmic_gpio.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/platform/x86/intel_pmic_gpio.c b/drivers/platform/x86/intel_pmic_gpio.c
index e61db9d..930e627 100644
--- a/drivers/platform/x86/intel_pmic_gpio.c
+++ b/drivers/platform/x86/intel_pmic_gpio.c
@@ -244,7 +244,11 @@ static void pmic_irq_handler(unsigned irq, struct irq_desc *desc)
 			generic_handle_irq(pg->irq_base + gpio);
 		}
 	}
-	desc->chip->eoi(irq);
+
+	if (desc->chip->irq_eoi)
+		desc->chip->irq_eoi(irq_get_irq_data(irq));
+	else
+		dev_warn(pg->chip.dev, "missing EOI handler for irq %d\n", irq);
 }
 
 static int __devinit platform_pmic_gpio_probe(struct platform_device *pdev)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] intel_pmic_gpio: modify EOI handling following change of kernel irq subsystem
  2010-12-31  1:48   ` Feng Tang
@ 2011-01-07 22:27     ` Matthew Garrett
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Garrett @ 2011-01-07 22:27 UTC (permalink / raw)
  To: Feng Tang
  Cc: platform-driver-x86@vger.kernel.org, alan@linux.intel.com,
	tglx@linutronix.de, Du, Alek

Applied, thanks.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-07 22:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-30  9:32 [PATCH] intel_pmic_gpio: modify EOI handling following change of kernel irq subsystem Feng Tang
2010-12-30 13:41 ` Matthew Garrett
2010-12-31  1:48   ` Feng Tang
2011-01-07 22:27     ` Matthew Garrett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.