[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87fvb69yec.fsf@dell.be.48ers.dk>
Date: Mon, 19 Jan 2015 23:52:11 +0100
From: Peter Korsgaard <peter@...sgaard.com>
To: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <gnurou@...il.com>,
Peter Korsgaard <jacmet@...site.dk>
Subject: Re: [PATCH 8/8] gpio/mpc8xxx: Use of_mm_gpiochip_remove
>>>>> "Ricardo" == Ricardo Ribalda Delgado <ricardo.ribalda@...il.com> writes:
> Since d621e8bae5ac9c67 (Create of_mm_gpiochip_remove), there is a
> counterpart for of_mm_gpiochip_add.
> This patch implements the remove function of the driver making use of
> it.
> Cc: Linus Walleij <linus.walleij@...aro.org>
> Cc: Alexandre Courbot <gnurou@...il.com>
> Cc: Peter Korsgaard <jacmet@...site.dk>
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
> ---
> drivers/gpio/gpio-mpc8xxx.c | 28 +++++++++++++++++++++++-----
> 1 file changed, 23 insertions(+), 5 deletions(-)
> diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c
> index 57eb794..a6952ba3 100644
> --- a/drivers/gpio/gpio-mpc8xxx.c
> +++ b/drivers/gpio/gpio-mpc8xxx.c
> @@ -40,6 +40,7 @@ struct mpc8xxx_gpio_chip {
> */
> u32 data;
> struct irq_domain *irq;
> + unsigned int irqn;
> const void *of_dev_id_data;
> };
> @@ -350,13 +351,14 @@ static int mpc8xxx_probe(struct platform_device *pdev)
> struct of_mm_gpio_chip *mm_gc;
> struct gpio_chip *gc;
> const struct of_device_id *id;
> - unsigned hwirq;
> int ret;
> mpc8xxx_gc = devm_kzalloc(&pdev->dev, sizeof(*mpc8xxx_gc), GFP_KERNEL);
> if (!mpc8xxx_gc)
> return -ENOMEM;
> + platform_set_drvdata(pdev, mpc8xxx_gc);
> +
> spin_lock_init(&mpc8xxx_gc->lock);
> mm_gc = &mpc8xxx_gc->mm_gc;
> @@ -377,8 +379,8 @@ static int mpc8xxx_probe(struct platform_device *pdev)
> if (ret)
> return ret;
> - hwirq = irq_of_parse_and_map(np, 0);
> - if (hwirq == NO_IRQ)
> + mpc8xxx_gc->irqn = irq_of_parse_and_map(np, 0);
> + if (mpc8xxx_gc->irqn == NO_IRQ)
> return 0;
With this return 0 converted to do of_mm_gpiochip_remove():
Acked-by: Peter Korsgaard <peter@...sgaard.com>
--
Bye, Peter Korsgaard
--
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