1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-07-19 23:04:25 +03:00
openwrt-xburst/target/linux/brcm63xx/patches-3.3/301-led_count.patch
jogo f0fe32e09a bcm63xx: reorder patches
Fix the order and names of patches.

Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32920 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-07-31 14:27:25 +00:00

35 lines
1.0 KiB
Diff

--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -862,6 +862,7 @@ static struct platform_device bcm63xx_gp
int __init board_register_devices(void)
{
int button_count = 0;
+ int led_count = 0;
if (board.has_uart0)
bcm63xx_uart_register(0);
@@ -900,7 +901,11 @@ int __init board_register_devices(void)
bcm63xx_flash_register();
- bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds);
+ /* count number of LEDs defined by this device */
+ while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name)
+ led_count++;
+
+ bcm63xx_led_data.num_leds = led_count;
bcm63xx_led_data.leds = board.leds;
platform_device_register(&bcm63xx_gpio_leds);
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
@@ -57,7 +57,7 @@ struct board_info {
struct bcm63xx_dsp_platform_data dsp;
/* GPIO LEDs */
- struct gpio_led leds[5];
+ struct gpio_led leds[14];
/* Buttons */
struct gpio_keys_button buttons[4];