mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
MIPS: TXX9: Convert gpio_txx9 to dynamic GPIO base allocation
Static allocation of GPIO base is deprecated, use dynamic allocation. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
parent
4af9ffbec4
commit
1d6f300c8e
|
|
@ -23,7 +23,6 @@ struct txx9_pio_reg {
|
|||
__u32 maskext;
|
||||
};
|
||||
|
||||
int txx9_gpio_init(unsigned long baseaddr,
|
||||
unsigned int base, unsigned int num);
|
||||
int txx9_gpio_init(unsigned long baseaddr, unsigned int num);
|
||||
|
||||
#endif /* __ASM_TXX9PIO_H */
|
||||
|
|
|
|||
|
|
@ -76,13 +76,12 @@ static struct gpio_chip txx9_gpio_chip = {
|
|||
.label = "TXx9",
|
||||
};
|
||||
|
||||
int __init txx9_gpio_init(unsigned long baseaddr,
|
||||
unsigned int base, unsigned int num)
|
||||
int __init txx9_gpio_init(unsigned long baseaddr, unsigned int num)
|
||||
{
|
||||
txx9_pioptr = ioremap(baseaddr, sizeof(struct txx9_pio_reg));
|
||||
if (!txx9_pioptr)
|
||||
return -ENODEV;
|
||||
txx9_gpio_chip.base = base;
|
||||
txx9_gpio_chip.base = -1;
|
||||
txx9_gpio_chip.ngpio = num;
|
||||
return gpiochip_add_data(&txx9_gpio_chip, NULL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ static void __init rbtx4927_gpio_init(void)
|
|||
|
||||
static void __init rbtx4927_arch_init(void)
|
||||
{
|
||||
txx9_gpio_init(TX4927_PIO_REG & 0xfffffffffULL, 0, TX4927_NUM_PIO);
|
||||
txx9_gpio_init(TX4927_PIO_REG & 0xfffffffffULL, TX4927_NUM_PIO);
|
||||
|
||||
rbtx4927_gpio_init();
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ static void __init rbtx4927_arch_init(void)
|
|||
|
||||
static void __init rbtx4937_arch_init(void)
|
||||
{
|
||||
txx9_gpio_init(TX4938_PIO_REG & 0xfffffffffULL, 0, TX4938_NUM_PIO);
|
||||
txx9_gpio_init(TX4938_PIO_REG & 0xfffffffffULL, TX4938_NUM_PIO);
|
||||
|
||||
rbtx4927_gpio_init();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user