[PATCH 3/5] U6715 gpio platform driver This driver is U6XXX platform generic

Russell King - ARM Linux linux at arm.linux.org.uk
Fri Jul 9 07:57:48 EDT 2010


On Mon, Jul 05, 2010 at 09:59:00AM +0200, Philippe Langlais wrote:
> +static void _set_gpio_direction(struct gpio_bank *bank, int gpio, int is_input)
> +{
> +	u32 reg = bank->gpio_base;

Virtual addresses are pointers not integers and should be of type
void __iomem *.  It's unfortunate that writel() and friends don't
warn about this - but making them do so ends up generating more
code with some GCC versions.

As I've already suggested, you can get around adding lots of casts
to void __iomem * to the code by defining an IOMEM macro, which you
can then use when you define things like GPIOA_PINS_REG.



More information about the linux-arm-kernel mailing list