mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 23:09:29 +02:00
MIPS: TXX9: Clean up txx9_iocled_init()
The sole caller already uses dynamic GPIO base allocation, so drop support for static allocation. While at it, drop the no longer used "lowactive" parameter. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
committed by
Thomas Bogendoerfer
parent
1d6f300c8e
commit
b0034259e9
@@ -79,8 +79,7 @@ static inline unsigned int __fls8(unsigned char x)
|
||||
return r;
|
||||
}
|
||||
|
||||
void txx9_iocled_init(unsigned long baseaddr,
|
||||
int basenum, unsigned int num, int lowactive,
|
||||
void txx9_iocled_init(unsigned long baseaddr, unsigned int num,
|
||||
const char *color, char **deftriggers);
|
||||
|
||||
void __init txx9_aclc_init(unsigned long baseaddr, int irq,
|
||||
|
||||
@@ -625,8 +625,7 @@ static struct gpiod_lookup_table txx9_iocled_table = {
|
||||
},
|
||||
};
|
||||
|
||||
void __init txx9_iocled_init(unsigned long baseaddr,
|
||||
int basenum, unsigned int num, int lowactive,
|
||||
void __init txx9_iocled_init(unsigned long baseaddr, unsigned int num,
|
||||
const char *color, char **deftriggers)
|
||||
{
|
||||
struct txx9_iocled_data *iocled;
|
||||
@@ -652,14 +651,12 @@ void __init txx9_iocled_init(unsigned long baseaddr,
|
||||
iocled->chip.direction_input = txx9_iocled_dir_in;
|
||||
iocled->chip.direction_output = txx9_iocled_dir_out;
|
||||
iocled->chip.label = "iocled";
|
||||
iocled->chip.base = basenum;
|
||||
iocled->chip.base = -1;
|
||||
iocled->chip.ngpio = num;
|
||||
if (gpiochip_add_data(&iocled->chip, iocled))
|
||||
goto out_unmap;
|
||||
if (basenum < 0)
|
||||
basenum = iocled->chip.base;
|
||||
|
||||
pdev = platform_device_alloc("leds-gpio", basenum);
|
||||
pdev = platform_device_alloc("leds-gpio", iocled->chip.base);
|
||||
if (!pdev)
|
||||
goto out_gpio;
|
||||
iocled->pdata.num_leds = num;
|
||||
@@ -689,8 +686,7 @@ out_free:
|
||||
kfree(iocled);
|
||||
}
|
||||
#else /* CONFIG_LEDS_GPIO */
|
||||
void __init txx9_iocled_init(unsigned long baseaddr,
|
||||
int basenum, unsigned int num, int lowactive,
|
||||
void __init txx9_iocled_init(unsigned long baseaddr, unsigned int num,
|
||||
const char *color, char **deftriggers)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ static void __init rbtx4927_device_init(void)
|
||||
tx4938_aclc_init();
|
||||
}
|
||||
platform_device_register_simple("txx9aclc-generic", -1, NULL, 0);
|
||||
txx9_iocled_init(RBTX4927_LED_ADDR - IO_BASE, -1, 3, 1, "green", NULL);
|
||||
txx9_iocled_init(RBTX4927_LED_ADDR - IO_BASE, 3, "green", NULL);
|
||||
rbtx4927_gpioled_init();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user