Re: [PATCH] gpio/plat-pxa: fix clash with gpiolib namespace

From: Eric Miao
Date: Mon Jun 13 2011 - 05:04:16 EST


On Mon, Jun 13, 2011 at 4:42 PM, Linus Walleij
<linus.walleij@xxxxxxxxxxxxxx> wrote:
> From: Linus Walleij <linus.walleij@xxxxxxxxxx>
>
> The PXA platform code has a static inline helper called
> gpio_to_chip which clashes with the gpiolib namespace if we
> try to expose the function with the same name from gpiolib,
> and it's still confusing even if we don't do that. So rename
> it to gpio_to_pxachip().
>
> Reported-by: H Hartley Sweeten <hartleys@xxxxxxxxxxxxxxxxxxx>
> Cc: Eric Miao <eric.miao@xxxxxxxxxx>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

OK, applied to 'devel'.

> ---
> Âarch/arm/plat-pxa/gpio.c | Â 10 +++++-----
> Â1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c
> index 48ebb94..a11dc36 100644
> --- a/arch/arm/plat-pxa/gpio.c
> +++ b/arch/arm/plat-pxa/gpio.c
> @@ -50,7 +50,7 @@ static inline void __iomem *gpio_chip_base(struct gpio_chip *c)
> Â Â Â Âreturn container_of(c, struct pxa_gpio_chip, chip)->regbase;
> Â}
>
> -static inline struct pxa_gpio_chip *gpio_to_chip(unsigned gpio)
> +static inline struct pxa_gpio_chip *gpio_to_pxachip(unsigned gpio)
> Â{
> Â Â Â Âreturn &pxa_gpio_chips[gpio_to_bank(gpio)];
> Â}
> @@ -161,7 +161,7 @@ static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type)
> Â Â Â Âint gpio = irq_to_gpio(d->irq);
> Â Â Â Âunsigned long gpdr, mask = GPIO_bit(gpio);
>
> - Â Â Â c = gpio_to_chip(gpio);
> + Â Â Â c = gpio_to_pxachip(gpio);
>
> Â Â Â Âif (type == IRQ_TYPE_PROBE) {
> Â Â Â Â Â Â Â Â/* Don't mess with enabled GPIOs using preconfigured edges or
> @@ -230,7 +230,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc)
> Âstatic void pxa_ack_muxed_gpio(struct irq_data *d)
> Â{
> Â Â Â Âint gpio = irq_to_gpio(d->irq);
> - Â Â Â struct pxa_gpio_chip *c = gpio_to_chip(gpio);
> + Â Â Â struct pxa_gpio_chip *c = gpio_to_pxachip(gpio);
>
> Â Â Â Â__raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET);
> Â}
> @@ -238,7 +238,7 @@ static void pxa_ack_muxed_gpio(struct irq_data *d)
> Âstatic void pxa_mask_muxed_gpio(struct irq_data *d)
> Â{
> Â Â Â Âint gpio = irq_to_gpio(d->irq);
> - Â Â Â struct pxa_gpio_chip *c = gpio_to_chip(gpio);
> + Â Â Â struct pxa_gpio_chip *c = gpio_to_pxachip(gpio);
> Â Â Â Âuint32_t grer, gfer;
>
> Â Â Â Âc->irq_mask &= ~GPIO_bit(gpio);
> @@ -252,7 +252,7 @@ static void pxa_mask_muxed_gpio(struct irq_data *d)
> Âstatic void pxa_unmask_muxed_gpio(struct irq_data *d)
> Â{
> Â Â Â Âint gpio = irq_to_gpio(d->irq);
> - Â Â Â struct pxa_gpio_chip *c = gpio_to_chip(gpio);
> + Â Â Â struct pxa_gpio_chip *c = gpio_to_pxachip(gpio);
>
> Â Â Â Âc->irq_mask |= GPIO_bit(gpio);
> Â Â Â Âupdate_edge_detect(c);
> --
> 1.7.3.2
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/