source: trunk/target/linux/brcm63xx/patches-2.6.39/141-led_count.patch @ 27254

Last change on this file since 27254 was 27254, checked in by florian, 5 years ago

[brcm63xx] fix tab damage in 141-led_count.patch

File size: 733 bytes
  • arch/mips/bcm63xx/boards/board_bcm963xx.c

    a b int __init board_register_devices(void) 
    881881{ 
    882882        u32 val; 
    883883        int button_count = 0; 
     884        int led_count = 0; 
    884885 
    885886        if (board.has_uart0) 
    886887                bcm63xx_uart_register(0); 
    int __init board_register_devices(void) 
    922923 
    923924        platform_device_register_simple("GPIODEV", 0, &gpiodev_resource, 1); 
    924925 
    925         bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds); 
     926        /* count number of LEDs defined by this device */ 
     927        while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name) 
     928                led_count++; 
     929 
     930        bcm63xx_led_data.num_leds = led_count; 
    926931        bcm63xx_led_data.leds = board.leds; 
    927932 
    928933        platform_device_register(&bcm63xx_gpio_leds); 
Note: See TracBrowser for help on using the repository browser.