source: trunk/target/linux/brcm63xx/patches-3.0/141-led_count.patch @ 27284

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

[brcm63xx] remove gpiodev, prefer sysfs gpio

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

    a b int __init board_register_devices(void) 
    889889{ 
    890890        u32 val; 
    891891        int button_count = 0; 
     892        int led_count = 0; 
    892893 
    893894        if (board.has_uart0) 
    894895                bcm63xx_uart_register(0); 
    int __init board_register_devices(void) 
    928929 
    929930        platform_device_register(&mtd_dev); 
    930931 
    931         bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds); 
     932        /* count number of LEDs defined by this device */ 
     933        while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name) 
     934                led_count++; 
     935 
     936        bcm63xx_led_data.num_leds = led_count; 
    932937        bcm63xx_led_data.leds = board.leds; 
    933938 
    934939        platform_device_register(&bcm63xx_gpio_leds); 
Note: See TracBrowser for help on using the repository browser.