linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: em: Use irq_data_get_irq_chip_data() at appropriate places
@ 2012-09-04 13:58 Axel Lin
  2012-09-06  7:18 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-09-04 13:58 UTC (permalink / raw)
  To: Linus Walleij, Grant Likely; +Cc: Magnus Damm, linux-kernel

Then we can remove irq_to_priv() function.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/gpio/gpio-em.c |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
index ec48ed5..efb4c2d 100644
--- a/drivers/gpio/gpio-em.c
+++ b/drivers/gpio/gpio-em.c
@@ -85,22 +85,16 @@ static inline void em_gio_write(struct em_gio_priv *p, int offs,
 		iowrite32(value, p->base1 + (offs - GIO_IDT0));
 }
 
-static inline struct em_gio_priv *irq_to_priv(struct irq_data *d)
-{
-	struct irq_chip *chip = irq_data_get_irq_chip(d);
-	return container_of(chip, struct em_gio_priv, irq_chip);
-}
-
 static void em_gio_irq_disable(struct irq_data *d)
 {
-	struct em_gio_priv *p = irq_to_priv(d);
+	struct em_gio_priv *p = irq_data_get_irq_chip_data(d);
 
 	em_gio_write(p, GIO_IDS, BIT(irqd_to_hwirq(d)));
 }
 
 static void em_gio_irq_enable(struct irq_data *d)
 {
-	struct em_gio_priv *p = irq_to_priv(d);
+	struct em_gio_priv *p = irq_data_get_irq_chip_data(d);
 
 	em_gio_write(p, GIO_IEN, BIT(irqd_to_hwirq(d)));
 }
@@ -118,7 +112,7 @@ static unsigned char em_gio_sense_table[IRQ_TYPE_SENSE_MASK + 1] = {
 static int em_gio_irq_set_type(struct irq_data *d, unsigned int type)
 {
 	unsigned char value = em_gio_sense_table[type & IRQ_TYPE_SENSE_MASK];
-	struct em_gio_priv *p = irq_to_priv(d);
+	struct em_gio_priv *p = irq_data_get_irq_chip_data(d);
 	unsigned int reg, offset, shift;
 	unsigned long flags;
 	unsigned long tmp;
-- 
1.7.9.5




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

* Re: [PATCH] gpio: em: Use irq_data_get_irq_chip_data() at appropriate places
  2012-09-04 13:58 [PATCH] gpio: em: Use irq_data_get_irq_chip_data() at appropriate places Axel Lin
@ 2012-09-06  7:18 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2012-09-06  7:18 UTC (permalink / raw)
  To: Axel Lin; +Cc: Grant Likely, Magnus Damm, linux-kernel

On Tue, Sep 4, 2012 at 3:58 PM, Axel Lin <axel.lin@gmail.com> wrote:

> Then we can remove irq_to_priv() function.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Thanks, applied.

Yours,
Linus Walleij

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

end of thread, other threads:[~2012-09-06  7:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-04 13:58 [PATCH] gpio: em: Use irq_data_get_irq_chip_data() at appropriate places Axel Lin
2012-09-06  7:18 ` Linus Walleij

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).