* [PATCH] gpio: f7188x: use gpiochip_get_data instead of container_of
@ 2016-09-16 16:58 Amitesh Singh
2016-09-18 11:35 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Amitesh Singh @ 2016-09-16 16:58 UTC (permalink / raw)
To: linus.walleij, gnurou; +Cc: linux-gpio, linux-kernel
gpiochip_add_data is already used to add data pointer and chip.
Lets rely on gpiochip_get_data which is getting used in other
gpio_chip functions.
Signed-off-by: Amitesh Singh <singh.amitesh@gmail.com>
---
drivers/gpio/gpio-f7188x.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-f7188x.c b/drivers/gpio/gpio-f7188x.c
index 600be84..e8accde 100644
--- a/drivers/gpio/gpio-f7188x.c
+++ b/drivers/gpio/gpio-f7188x.c
@@ -214,8 +214,7 @@ static struct f7188x_gpio_bank f81866_gpio_bank[] = {
static int f7188x_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
{
int err;
- struct f7188x_gpio_bank *bank =
- container_of(chip, struct f7188x_gpio_bank, chip);
+ struct f7188x_gpio_bank *bank = gpiochip_get_data(chip);
struct f7188x_sio *sio = bank->data->sio;
u8 dir;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gpio: f7188x: use gpiochip_get_data instead of container_of
2016-09-16 16:58 [PATCH] gpio: f7188x: use gpiochip_get_data instead of container_of Amitesh Singh
@ 2016-09-18 11:35 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2016-09-18 11:35 UTC (permalink / raw)
To: Amitesh Singh
Cc: Alexandre Courbot, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
On Fri, Sep 16, 2016 at 6:58 PM, Amitesh Singh <singh.amitesh@gmail.com> wrote:
> gpiochip_add_data is already used to add data pointer and chip.
> Lets rely on gpiochip_get_data which is getting used in other
> gpio_chip functions.
>
> Signed-off-by: Amitesh Singh <singh.amitesh@gmail.com>
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-18 11:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-16 16:58 [PATCH] gpio: f7188x: use gpiochip_get_data instead of container_of Amitesh Singh
2016-09-18 11:35 ` Linus Walleij
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).