mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lennert Buytenhek <buytenh@wantstofly.org>
To: Rabin Vincent <rabin.vincent@stericsson.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: [PATCH 08/10] gpio: tc35892-gpio: irq_data conversion.
Date: Mon, 13 Dec 2010 13:03:05 +0100	[thread overview]
Message-ID: <20101213120305.GG15575@mail.wantstofly.org> (raw)
In-Reply-To: <cover.1292240053.git.buytenh@wantstofly.org>

Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
---
 drivers/gpio/tc35892-gpio.c |   36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/gpio/tc35892-gpio.c b/drivers/gpio/tc35892-gpio.c
index 7e10c93..867e44b 100644
--- a/drivers/gpio/tc35892-gpio.c
+++ b/drivers/gpio/tc35892-gpio.c
@@ -110,10 +110,10 @@ static struct gpio_chip template_chip = {
 	.can_sleep		= 1,
 };
 
-static int tc35892_gpio_irq_set_type(unsigned int irq, unsigned int type)
+static int tc35892_gpio_irq_set_type(struct irq_data *d, unsigned int type)
 {
-	struct tc35892_gpio *tc35892_gpio = get_irq_chip_data(irq);
-	int offset = irq - tc35892_gpio->irq_base;
+	struct tc35892_gpio *tc35892_gpio = irq_data_get_irq_chip_data(d);
+	int offset = d->irq - tc35892_gpio->irq_base;
 	int regoffset = offset / 8;
 	int mask = 1 << (offset % 8);
 
@@ -137,16 +137,16 @@ static int tc35892_gpio_irq_set_type(unsigned int irq, unsigned int type)
 	return 0;
 }
 
-static void tc35892_gpio_irq_lock(unsigned int irq)
+static void tc35892_gpio_irq_lock(struct irq_data *d)
 {
-	struct tc35892_gpio *tc35892_gpio = get_irq_chip_data(irq);
+	struct tc35892_gpio *tc35892_gpio = irq_data_get_irq_chip_data(d);
 
 	mutex_lock(&tc35892_gpio->irq_lock);
 }
 
-static void tc35892_gpio_irq_sync_unlock(unsigned int irq)
+static void tc35892_gpio_irq_sync_unlock(struct irq_data *d)
 {
-	struct tc35892_gpio *tc35892_gpio = get_irq_chip_data(irq);
+	struct tc35892_gpio *tc35892_gpio = irq_data_get_irq_chip_data(d);
 	struct tc35892 *tc35892 = tc35892_gpio->tc35892;
 	static const u8 regmap[] = {
 		[REG_IBE]	= TC35892_GPIOIBE0,
@@ -172,20 +172,20 @@ static void tc35892_gpio_irq_sync_unlock(unsigned int irq)
 	mutex_unlock(&tc35892_gpio->irq_lock);
 }
 
-static void tc35892_gpio_irq_mask(unsigned int irq)
+static void tc35892_gpio_irq_mask(struct irq_data *d)
 {
-	struct tc35892_gpio *tc35892_gpio = get_irq_chip_data(irq);
-	int offset = irq - tc35892_gpio->irq_base;
+	struct tc35892_gpio *tc35892_gpio = irq_data_get_irq_chip_data(d);
+	int offset = d->irq - tc35892_gpio->irq_base;
 	int regoffset = offset / 8;
 	int mask = 1 << (offset % 8);
 
 	tc35892_gpio->regs[REG_IE][regoffset] &= ~mask;
 }
 
-static void tc35892_gpio_irq_unmask(unsigned int irq)
+static void tc35892_gpio_irq_unmask(struct irq_data *d)
 {
-	struct tc35892_gpio *tc35892_gpio = get_irq_chip_data(irq);
-	int offset = irq - tc35892_gpio->irq_base;
+	struct tc35892_gpio *tc35892_gpio = irq_data_get_irq_chip_data(d);
+	int offset = d->irq - tc35892_gpio->irq_base;
 	int regoffset = offset / 8;
 	int mask = 1 << (offset % 8);
 
@@ -194,11 +194,11 @@ static void tc35892_gpio_irq_unmask(unsigned int irq)
 
 static struct irq_chip tc35892_gpio_irq_chip = {
 	.name			= "tc35892-gpio",
-	.bus_lock		= tc35892_gpio_irq_lock,
-	.bus_sync_unlock	= tc35892_gpio_irq_sync_unlock,
-	.mask			= tc35892_gpio_irq_mask,
-	.unmask			= tc35892_gpio_irq_unmask,
-	.set_type		= tc35892_gpio_irq_set_type,
+	.irq_bus_lock		= tc35892_gpio_irq_lock,
+	.irq_bus_sync_unlock	= tc35892_gpio_irq_sync_unlock,
+	.irq_mask		= tc35892_gpio_irq_mask,
+	.irq_unmask		= tc35892_gpio_irq_unmask,
+	.irq_set_type		= tc35892_gpio_irq_set_type,
 };
 
 static irqreturn_t tc35892_gpio_irq(int irq, void *dev)
-- 
1.7.1


  parent reply	other threads:[~2010-12-13 12:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1292240053.git.buytenh@wantstofly.org>
2010-12-13 12:02 ` [PATCH 01/10] gpio: adp5588-gpio: " Lennert Buytenhek
2010-12-13 12:29   ` Hennerich, Michael
2010-12-13 12:02 ` [PATCH 02/10] gpio: langwell_gpio: " Lennert Buytenhek
2010-12-13 12:02 ` [PATCH 03/10] gpio: max732x: " Lennert Buytenhek
2010-12-14 11:24   ` Marc Zyngier
2010-12-13 12:02 ` [PATCH 04/10] gpio: pca953x: " Lennert Buytenhek
2010-12-13 12:02 ` [PATCH 05/10] gpio: pl061: " Lennert Buytenhek
2010-12-13 12:48   ` Baruch Siach
2010-12-13 12:02 ` [PATCH 06/10] gpio: stmpe-gpio: " Lennert Buytenhek
2010-12-13 12:07   ` Rabin Vincent
2010-12-13 12:03 ` [PATCH 07/10] gpio: sx150x: " Lennert Buytenhek
2010-12-15 19:58   ` Rohit Vaswani
2010-12-13 12:03 ` Lennert Buytenhek [this message]
2010-12-13 12:08   ` [PATCH 08/10] gpio: tc35892-gpio: " Rabin Vincent
2010-12-13 12:03 ` [PATCH 09/10] gpio: timbgpio: " Lennert Buytenhek
2010-12-13 12:03 ` [PATCH 10/10] gpio: vr41xx_giu: " Lennert Buytenhek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101213120305.GG15575@mail.wantstofly.org \
    --to=buytenh@wantstofly.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rabin.vincent@stericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®