From: Michael Welling <mwelling@ieee.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org, Johan Hovold <johan@kernel.org>,
Alexandre Courbot <acourbot@nvidia.com>,
Markus Pargmann <mpa@pengutronix.de>,
Paul Bolle <pebolle@tiscali.nl>,
Kukjin Kim <kgene.kim@samsung.com>
Subject: Re: [PATCH 056/182] gpio: samsung: use gpiochip data pointer
Date: Wed, 9 Dec 2015 16:50:24 -0600 [thread overview]
Message-ID: <20151209225024.GA28304@deathstar> (raw)
In-Reply-To: <1449667342-32435-1-git-send-email-linus.walleij@linaro.org>
On Wed, Dec 09, 2015 at 02:22:22PM +0100, 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: Paul Bolle <pebolle@tiscali.nl>
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/gpio/gpio-samsung.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
> index 7c288ba4dc87..4cb4a314c02b 100644
> --- a/drivers/gpio/gpio-samsung.c
> +++ b/drivers/gpio/gpio-samsung.c
> @@ -753,7 +753,7 @@ static void __init samsung_gpiolib_add(struct samsung_gpio_chip *chip)
> #endif
>
gpiochip_add is still mentioned in the comments instead of gpiochip_add_data.
Both here and in the comment block above this function.
> /* gpiochip_add() prints own failure message on error. */
> - ret = gpiochip_add(gc);
> + ret = gpiochip_add_data(gc, chip);
> if (ret >= 0)
> s3c_gpiolib_track(chip);
> }
> @@ -862,7 +862,7 @@ static void __init samsung_gpiolib_add_4bit2_chips(struct samsung_gpio_chip *chi
>
> int samsung_gpiolib_to_irq(struct gpio_chip *chip, unsigned int offset)
> {
> - struct samsung_gpio_chip *samsung_chip = container_of(chip, struct samsung_gpio_chip, chip);
> + struct samsung_gpio_chip *samsung_chip = gpiochip_get_data(chip);
>
> return samsung_chip->irq_base + offset;
> }
> --
> 2.4.3
>
prev parent reply other threads:[~2015-12-09 22:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-09 13:22 [PATCH 056/182] gpio: samsung: use gpiochip data pointer Linus Walleij
2015-12-09 22:50 ` Michael Welling [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=20151209225024.GA28304@deathstar \
--to=mwelling@ieee.org \
--cc=acourbot@nvidia.com \
--cc=johan@kernel.org \
--cc=kgene.kim@samsung.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mpa@pengutronix.de \
--cc=pebolle@tiscali.nl \
/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;
as well as URLs for NNTP newsgroup(s).