1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -336,24 +336,39 @@ static struct board_info __initdata boar
12 + .default_trigger = "default-on",
31 - .default_trigger = "default-on",
51 @@ -855,6 +870,7 @@ static struct platform_device bcm63xx_gp
52 int __init board_register_devices(void)
58 bcm63xx_pcmcia_register();
59 @@ -901,7 +917,11 @@ int __init board_register_devices(void)
61 platform_device_register_simple("GPIODEV", 0, &gpiodev_resource, 1);
63 - bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds);
64 + /* count number of LEDs defined by this device */
65 + while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name)
68 + bcm63xx_led_data.num_leds = led_count;
69 bcm63xx_led_data.leds = board.leds;
71 platform_device_register(&bcm63xx_gpio_leds);
72 --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
73 +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
74 @@ -54,7 +54,7 @@ struct board_info {
75 struct bcm63xx_dsp_platform_data dsp;
78 - struct gpio_led leds[5];
79 + struct gpio_led leds[8];
82 struct gpio_button reset_buttons[1];