* [PATCH 052/182] gpio: pxa: use gpiochip data pointer
@ 2015-12-09 13:21 Linus Walleij
2015-12-09 21:54 ` Robert Jarzmik
0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2015-12-09 13:21 UTC (permalink / raw)
To: linux-gpio, Johan Hovold, Alexandre Courbot, Michael Welling,
Markus Pargmann
Cc: Linus Walleij, Robert Jarzmik, Daniel Mack
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: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Daniel Mack <zonque@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/gpio/gpio-pxa.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index bce99182578b..1f574a9f88fe 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -153,7 +153,8 @@ static struct pxa_gpio_id pxa1928_id = {
static inline void __iomem *gpio_chip_base(struct gpio_chip *c)
{
- return container_of(c, struct pxa_gpio_chip, chip)->regbase;
+ struct pxa_gpio_chip *p = gpiochip_get_data(c);
+ return p->regbase;
}
static inline struct pxa_gpio_chip *gpio_to_pxachip(unsigned gpio)
@@ -334,7 +335,7 @@ static int pxa_init_gpio_chip(int gpio_end,
/* number of GPIOs on last bank may be less than 32 */
c->ngpio = (gpio + 31 > gpio_end) ? (gpio_end - gpio + 1) : 32;
- gpiochip_add(c);
+ gpiochip_add_data(c, &chips[i]);
}
pxa_gpio_chips = chips;
return 0;
--
2.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 052/182] gpio: pxa: use gpiochip data pointer
2015-12-09 13:21 [PATCH 052/182] gpio: pxa: use gpiochip data pointer Linus Walleij
@ 2015-12-09 21:54 ` Robert Jarzmik
2015-12-13 20:19 ` Linus Walleij
0 siblings, 1 reply; 4+ messages in thread
From: Robert Jarzmik @ 2015-12-09 21:54 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-gpio, Johan Hovold, Alexandre Courbot, Michael Welling,
Markus Pargmann, Daniel Mack
Linus Walleij <linus.walleij@linaro.org> writes:
> 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: Robert Jarzmik <robert.jarzmik@free.fr>
> Cc: Daniel Mack <zonque@gmail.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This conflicts with the earlier serie in https://lkml.org/lkml/2015/11/28/136
which revamps the gpio_chip_base() anyway.
The patch is perfectly fine, and yet it's the opportunity to ask a review of the
other serie before other patches make me respin the serie, isn't it ?
Oh, and :
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cheers.
--
Robert
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 052/182] gpio: pxa: use gpiochip data pointer
2015-12-09 21:54 ` Robert Jarzmik
@ 2015-12-13 20:19 ` Linus Walleij
2015-12-13 22:48 ` Robert Jarzmik
0 siblings, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2015-12-13 20:19 UTC (permalink / raw)
To: Robert Jarzmik
Cc: linux-gpio, Johan Hovold, Alexandre Courbot, Michael Welling,
Markus Pargmann, Daniel Mack
On Wed, Dec 9, 2015 at 10:54 PM, Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> Linus Walleij <linus.walleij@linaro.org> writes:
>
>> 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: Robert Jarzmik <robert.jarzmik@free.fr>
>> Cc: Daniel Mack <zonque@gmail.com>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
> This conflicts with the earlier serie in https://lkml.org/lkml/2015/11/28/136
> which revamps the gpio_chip_base() anyway.
I have already fixed that, I think.
> The patch is perfectly fine, and yet it's the opportunity to ask a review of the
> other serie before other patches make me respin the serie, isn't it ?
I merged it and rebased my patch.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 052/182] gpio: pxa: use gpiochip data pointer
2015-12-13 20:19 ` Linus Walleij
@ 2015-12-13 22:48 ` Robert Jarzmik
0 siblings, 0 replies; 4+ messages in thread
From: Robert Jarzmik @ 2015-12-13 22:48 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-gpio, Johan Hovold, Alexandre Courbot, Michael Welling,
Markus Pargmann, Daniel Mack
Linus Walleij <linus.walleij@linaro.org> writes:
>> The patch is perfectly fine, and yet it's the opportunity to ask a review of the
>> other serie before other patches make me respin the serie, isn't it ?
>
> I merged it and rebased my patch.
Excellent, thanks.
Cheers.
--
Robert
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-13 22:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-09 13:21 [PATCH 052/182] gpio: pxa: use gpiochip data pointer Linus Walleij
2015-12-09 21:54 ` Robert Jarzmik
2015-12-13 20:19 ` Linus Walleij
2015-12-13 22:48 ` Robert Jarzmik
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.