All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org, Johan Hovold <johan@kernel.org>,
	Alexandre Courbot <acourbot@nvidia.com>,
	Michael Welling <mwelling@ieee.org>,
	Markus Pargmann <mpa@pengutronix.de>,
	Riku Voipio <riku.voipio@iki.fi>,
	Richard Purdie <rpurdie@rpsys.net>,
	linux-leds@vger.kernel.org
Subject: Re: [PATCH 159/182] leds: tca6507: use gpiochip data pointer
Date: Wed, 09 Dec 2015 15:29:30 +0100	[thread overview]
Message-ID: <56683ACA.8020506@samsung.com> (raw)
In-Reply-To: <1449668778-5980-1-git-send-email-linus.walleij@linaro.org>

On 12/09/2015 02:46 PM, Linus Walleij wrote:
> This makes the driver use the data pointer added to the gpio_chip
> to store a pointer to the state container instead of relying on
> container_of().
>
> Cc: Riku Voipio <riku.voipio@iki.fi>
> Cc: Richard Purdie <rpurdie@rpsys.net>
> Cc: Jacek Anaszewski <j.anaszewski@samsung.com>
> Cc: linux-leds@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> LEDS people: please ACK this so I can merge it in the GPIO tree.
> ---
>   drivers/leds/leds-tca6507.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c
> index 75529a24a615..c548ea10f0f0 100644
> --- a/drivers/leds/leds-tca6507.c
> +++ b/drivers/leds/leds-tca6507.c
> @@ -603,7 +603,7 @@ static int tca6507_blink_set(struct led_classdev *led_cdev,
>   static void tca6507_gpio_set_value(struct gpio_chip *gc,
>   				   unsigned offset, int val)
>   {
> -	struct tca6507_chip *tca = container_of(gc, struct tca6507_chip, gpio);
> +	struct tca6507_chip *tca = gpiochip_get_data(gc);
>   	unsigned long flags;
>
>   	spin_lock_irqsave(&tca->lock, flags);
> @@ -655,7 +655,7 @@ static int tca6507_probe_gpios(struct i2c_client *client,
>   #ifdef CONFIG_OF_GPIO
>   	tca->gpio.of_node = of_node_get(client->dev.of_node);
>   #endif
> -	err = gpiochip_add(&tca->gpio);
> +	err = gpiochip_add_data(&tca->gpio, tca);
>   	if (err) {
>   		tca->gpio.ngpio = 0;
>   		return err;
>

Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com>

-- 
Best Regards,
Jacek Anaszewski

      reply	other threads:[~2015-12-09 14:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-09 13:46 [PATCH 159/182] leds: tca6507: use gpiochip data pointer Linus Walleij
2015-12-09 14:29 ` Jacek Anaszewski [this message]

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=56683ACA.8020506@samsung.com \
    --to=j.anaszewski@samsung.com \
    --cc=acourbot@nvidia.com \
    --cc=johan@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=mpa@pengutronix.de \
    --cc=mwelling@ieee.org \
    --cc=riku.voipio@iki.fi \
    --cc=rpurdie@rpsys.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.