On Tue, Sep 25, 2012 at 2:03 PM, Neil Zhang <zhan...@marvell.com> wrote:

> We need to return 0 or 1 when get gpio value.

OK...

>  static int pxa_gpio_get(struct gpio_chip *chip, unsigned offset)
>  {
> -       return readl_relaxed(gpio_chip_base(chip) + GPLR_OFFSET) & (1 << 
> offset);
> +       u32 gplr = __raw_readl(gpio_chip_base(chip) + GPLR_OFFSET);
> +       u32 mask = 1 << offset;
> +
> +       return (gplr & mask) != 0;

So why are you switching the perfectly working readl_relaxed() call to
a __raw_readl()?

Please don't do this, and respin the patch.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to