lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <544AC56F16B56944AEC3BD4E3D591771324BCA82A7@LIMKCMBX1.ad.analog.com>
Date:	Mon, 13 Dec 2010 12:31:44 +0000
From:	"Hennerich, Michael" <Michael.Hennerich@...log.com>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mike Frysinger <vapier@...too.org>,
	Grant Likely <grant.likely@...retlab.ca>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Paul Mundt <lethal@...ux-sh.org>,
	"device-drivers-devel@...ckfin.uclinux.org" 
	<device-drivers-devel@...ckfin.uclinux.org>,
	"buytenh@...tstofly.org" <buytenh@...tstofly.org>
Subject: RE: [PATCH] gpiolib: Convert ADP5588 to new irq_ APIs

Mark Brown wrote on 2010-12-12:
> The genirq core is being updated to pass struct irq_data to irq_chip
> operations instead of an irq number. Update the ADP5588 GPIO driver to
> the new API.
>
> Signed-off-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>

Acked-by: Michael Hennerich <michael.hennerich@...log.com>

> ---
>  drivers/gpio/adp5588-gpio.c |   38 +++++++++++++++++++----------------
>  --- 1 files changed, 19 insertions(+), 19 deletions(-)
> diff --git a/drivers/gpio/adp5588-gpio.c b/drivers/gpio/adp5588-gpio.c
> index 0871f78..a8c1e58 100644
> --- a/drivers/gpio/adp5588-gpio.c
> +++ b/drivers/gpio/adp5588-gpio.c
> @@ -146,9 +146,9 @@ static int adp5588_gpio_to_irq(struct gpio_chip
> *chip, unsigned off)
>       return dev->irq_base + off;
>  }
> -static void adp5588_irq_bus_lock(unsigned int irq)
> +static void adp5588_irq_bus_lock(struct irq_data *data)
>  {
> -     struct adp5588_gpio *dev = get_irq_chip_data(irq);
> +     struct adp5588_gpio *dev = irq_data_get_irq_chip_data(data);
>       mutex_lock(&dev->irq_lock);
>  }
> @@ -160,9 +160,9 @@ static void adp5588_irq_bus_lock(unsigned int irq)
>    * and unlocks the bus.
>    */
> -static void adp5588_irq_bus_sync_unlock(unsigned int irq)
> +static void adp5588_irq_bus_sync_unlock(struct irq_data *data)
>  {
> -     struct adp5588_gpio *dev = get_irq_chip_data(irq);
> +     struct adp5588_gpio *dev = irq_data_get_irq_chip_data(data);
>       int i;
>
>       for (i = 0; i <= ADP5588_BANK(ADP5588_MAXGPIO); i++) @@ -175,31
>  +175,31 @@ static void adp5588_irq_bus_sync_unlock(unsigned int irq)
>       mutex_unlock(&dev->irq_lock); }
> -static void adp5588_irq_mask(unsigned int irq)
> +static void adp5588_irq_mask(struct irq_data *data)
>  {
> -     struct adp5588_gpio *dev = get_irq_chip_data(irq);
> -     unsigned gpio = irq - dev->irq_base;
> +     struct adp5588_gpio *dev = irq_data_get_irq_chip_data(data);
> +     unsigned gpio = data->irq - dev->irq_base;
>
>       dev->irq_mask[ADP5588_BANK(gpio)] &= ~ADP5588_BIT(gpio);  }
> -static void adp5588_irq_unmask(unsigned int irq)
> +static void adp5588_irq_unmask(struct irq_data *data)
>  {
> -     struct adp5588_gpio *dev = get_irq_chip_data(irq);
> -     unsigned gpio = irq - dev->irq_base;
> +     struct adp5588_gpio *dev = irq_data_get_irq_chip_data(data);
> +     unsigned gpio = data->irq - dev->irq_base;
>
>       dev->irq_mask[ADP5588_BANK(gpio)] |= ADP5588_BIT(gpio);  }
> -static int adp5588_irq_set_type(unsigned int irq, unsigned int type)
> +static int adp5588_irq_set_type(struct irq_data *data, unsigned int
> +type)
>  {
> -     struct adp5588_gpio *dev = get_irq_chip_data(irq);
> -     uint16_t gpio = irq - dev->irq_base;
> +     struct adp5588_gpio *dev = irq_data_get_irq_chip_data(data);
> +     uint16_t gpio = data->irq - dev->irq_base;
>       unsigned bank, bit;
>
>       if ((type & IRQ_TYPE_EDGE_BOTH)) {
>               dev_err(&dev->client->dev, "irq %d: unsupported type %d\n",
> -                     irq, type);
> +                     data->irq, type);
>               return -EINVAL;
>       }
> @@ -222,11 +222,11 @@ static int adp5588_irq_set_type(unsigned int
> irq, unsigned int type)
>
>  static struct irq_chip adp5588_irq_chip = {
>       .name                   = "adp5588",
> -     .mask                   = adp5588_irq_mask,
> -     .unmask                 = adp5588_irq_unmask,
> -     .bus_lock               = adp5588_irq_bus_lock,
> -     .bus_sync_unlock        = adp5588_irq_bus_sync_unlock,
> -     .set_type               = adp5588_irq_set_type,
> +     .irq_mask               = adp5588_irq_mask,
> +     .irq_unmask             = adp5588_irq_unmask,
> +     .irq_bus_lock           = adp5588_irq_bus_lock,
> +     .irq_bus_sync_unlock    = adp5588_irq_bus_sync_unlock,
> +     .irq_set_type           = adp5588_irq_set_type,
>  };
>
>  static int adp5588_gpio_read_intstat(struct i2c_client *client, u8
> *buf)

Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 4036 Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ