Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gpio: bcm-kona: fix bcm_kona_gpio_reset() warnings

The bcm_kona_gpio_reset() calls bcm_kona_gpio_write_lock_regs()
with what looks like the wrong parameter. The write_lock_regs
function takes a pointer to the registers, not the bcm_kona_gpio
structure.

Fix the warning, and probably bug by changing the function to
pass reg_base instead of kona_gpio, fixing the following warning:

drivers/gpio/gpio-bcm-kona.c:550:47: warning: incorrect type in argument 1
(different address spaces)
expected void [noderef] <asn:2>*reg_base
got struct bcm_kona_gpio *kona_gpio
warning: incorrect type in argument 1 (different address spaces)
expected void [noderef] <asn:2>*reg_base
got struct bcm_kona_gpio *kona_gpio

Cc: stable@vger.kernel.org
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Acked-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Ben Dooks and committed by
Linus Walleij
b66b2a0a 60a5eaba

+2 -2
+2 -2
drivers/gpio/gpio-bcm-kona.c
··· 547 547 /* disable interrupts and clear status */ 548 548 for (i = 0; i < kona_gpio->num_bank; i++) { 549 549 /* Unlock the entire bank first */ 550 - bcm_kona_gpio_write_lock_regs(kona_gpio, i, UNLOCK_CODE); 550 + bcm_kona_gpio_write_lock_regs(reg_base, i, UNLOCK_CODE); 551 551 writel(0xffffffff, reg_base + GPIO_INT_MASK(i)); 552 552 writel(0xffffffff, reg_base + GPIO_INT_STATUS(i)); 553 553 /* Now re-lock the bank */ 554 - bcm_kona_gpio_write_lock_regs(kona_gpio, i, LOCK_CODE); 554 + bcm_kona_gpio_write_lock_regs(reg_base, i, LOCK_CODE); 555 555 } 556 556 } 557 557