public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rohit Vaswani <rvaswani@codeaurora.org>
To: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Gregory Bean <gbean@codeaurora.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 07/10] gpio: sx150x: irq_data conversion.
Date: Wed, 15 Dec 2010 11:58:10 -0800	[thread overview]
Message-ID: <4D091DD2.3070300@codeaurora.org> (raw)
In-Reply-To: <20101213120302.GF15575@mail.wantstofly.org>

On 12/13/2010 4:03 AM, Lennert Buytenhek wrote:
> Signed-off-by: Lennert Buytenhek<buytenh@secretlab.ca>
Tested-by: Rohit Vaswani <rvaswani@codeaurora.org>
> ---
>   drivers/gpio/sx150x.c |   46 +++++++++++++++++++++++-----------------------
>   1 files changed, 23 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/gpio/sx150x.c b/drivers/gpio/sx150x.c
> index 823559a..e60be00 100644
> --- a/drivers/gpio/sx150x.c
> +++ b/drivers/gpio/sx150x.c
> @@ -304,36 +304,36 @@ static int sx150x_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
>   	return chip->irq_base + offset;
>   }
>
> -static void sx150x_irq_mask(unsigned int irq)
> +static void sx150x_irq_mask(struct irq_data *d)
>   {
> -	struct irq_chip *ic = get_irq_chip(irq);
> +	struct irq_chip *ic = irq_data_get_irq_chip(d);
>   	struct sx150x_chip *chip;
>   	unsigned n;
>
>   	chip = container_of(ic, struct sx150x_chip, irq_chip);
> -	n = irq - chip->irq_base;
> +	n = d->irq - chip->irq_base;
>
>   	sx150x_write_cfg(chip, n, 1, chip->dev_cfg->reg_irq_mask, 1);
>   	sx150x_write_cfg(chip, n, 2, chip->dev_cfg->reg_sense, 0);
>   }
>
> -static void sx150x_irq_unmask(unsigned int irq)
> +static void sx150x_irq_unmask(struct irq_data *d)
>   {
> -	struct irq_chip *ic = get_irq_chip(irq);
> +	struct irq_chip *ic = irq_data_get_irq_chip(d);
>   	struct sx150x_chip *chip;
>   	unsigned n;
>
>   	chip = container_of(ic, struct sx150x_chip, irq_chip);
> -	n = irq - chip->irq_base;
> +	n = d->irq - chip->irq_base;
>
>   	sx150x_write_cfg(chip, n, 1, chip->dev_cfg->reg_irq_mask, 0);
>   	sx150x_write_cfg(chip, n, 2, chip->dev_cfg->reg_sense,
>   			 chip->irq_sense>>  (n * 2));
>   }
>
> -static int sx150x_irq_set_type(unsigned int irq, unsigned int flow_type)
> +static int sx150x_irq_set_type(struct irq_data *d, unsigned int flow_type)
>   {
> -	struct irq_chip *ic = get_irq_chip(irq);
> +	struct irq_chip *ic = irq_data_get_irq_chip(d);
>   	struct sx150x_chip *chip;
>   	unsigned n, val = 0;
>
> @@ -341,7 +341,7 @@ static int sx150x_irq_set_type(unsigned int irq, unsigned int flow_type)
>   		return -EINVAL;
>
>   	chip = container_of(ic, struct sx150x_chip, irq_chip);
> -	n = irq - chip->irq_base;
> +	n = d->irq - chip->irq_base;
>
>   	if (flow_type&  IRQ_TYPE_EDGE_RISING)
>   		val |= 0x1;
> @@ -386,9 +386,9 @@ static irqreturn_t sx150x_irq_thread_fn(int irq, void *dev_id)
>   	return (nhandled>  0 ? IRQ_HANDLED : IRQ_NONE);
>   }
>
> -static void sx150x_irq_bus_lock(unsigned int irq)
> +static void sx150x_irq_bus_lock(struct irq_data *d)
>   {
> -	struct irq_chip *ic = get_irq_chip(irq);
> +	struct irq_chip *ic = irq_data_get_irq_chip(d);
>   	struct sx150x_chip *chip;
>
>   	chip = container_of(ic, struct sx150x_chip, irq_chip);
> @@ -396,9 +396,9 @@ static void sx150x_irq_bus_lock(unsigned int irq)
>   	mutex_lock(&chip->lock);
>   }
>
> -static void sx150x_irq_bus_sync_unlock(unsigned int irq)
> +static void sx150x_irq_bus_sync_unlock(struct irq_data *d)
>   {
> -	struct irq_chip *ic = get_irq_chip(irq);
> +	struct irq_chip *ic = irq_data_get_irq_chip(d);
>   	struct sx150x_chip *chip;
>   	unsigned n;
>
> @@ -437,16 +437,16 @@ static void sx150x_init_chip(struct sx150x_chip *chip,
>   	if (pdata->oscio_is_gpo)
>   		++chip->gpio_chip.ngpio;
>
> -	chip->irq_chip.name            = client->name;
> -	chip->irq_chip.mask            = sx150x_irq_mask;
> -	chip->irq_chip.unmask          = sx150x_irq_unmask;
> -	chip->irq_chip.set_type        = sx150x_irq_set_type;
> -	chip->irq_chip.bus_lock        = sx150x_irq_bus_lock;
> -	chip->irq_chip.bus_sync_unlock = sx150x_irq_bus_sync_unlock;
> -	chip->irq_summary              = -1;
> -	chip->irq_base                 = -1;
> -	chip->irq_sense                = 0;
> -	chip->irq_set_type_pending     = 0;
> +	chip->irq_chip.name                = client->name;
> +	chip->irq_chip.irq_mask            = sx150x_irq_mask;
> +	chip->irq_chip.irq_unmask          = sx150x_irq_unmask;
> +	chip->irq_chip.irq_set_type        = sx150x_irq_set_type;
> +	chip->irq_chip.irq_bus_lock        = sx150x_irq_bus_lock;
> +	chip->irq_chip.irq_bus_sync_unlock = sx150x_irq_bus_sync_unlock;
> +	chip->irq_summary                  = -1;
> +	chip->irq_base                     = -1;
> +	chip->irq_sense                    = 0;
> +	chip->irq_set_type_pending         = 0;
>   }
>
>   static int sx150x_init_io(struct sx150x_chip *chip, u8 base, u16 cfg)


Thanks,
Rohit Vaswani

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


  reply	other threads:[~2010-12-15 19:58 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: irq_data conversion 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 [this message]
2010-12-13 12:03 ` [PATCH 08/10] gpio: tc35892-gpio: " Lennert Buytenhek
2010-12-13 12:08   ` 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=4D091DD2.3070300@codeaurora.org \
    --to=rvaswani@codeaurora.org \
    --cc=akpm@linux-foundation.org \
    --cc=buytenh@wantstofly.org \
    --cc=gbean@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    /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