ixp4xx: fix MAC parsing and switch (unmanaged) functionality for wrt300nv2 (thank...
[openwrt.git] / target / linux / brcm63xx / patches-2.6.32 / 140-new_bcm96348gw_leds.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -331,29 +331,28 @@ static struct board_info __initdata boar
4
5 .leds = {
6 {
7 - .name = "adsl-fail",
8 - .gpio = 2,
9 + .name = "line1",
10 + .gpio = 4,
11 .active_low = 1,
12 },
13 {
14 - .name = "ppp",
15 - .gpio = 3,
16 + .name = "line2",
17 + .gpio = 5,
18 .active_low = 1,
19 },
20 {
21 - .name = "ppp-fail",
22 - .gpio = 4,
23 + .name = "line3",
24 + .gpio = 6,
25 .active_low = 1,
26 },
27 {
28 - .name = "power",
29 - .gpio = 0,
30 + .name = "tel",
31 + .gpio = 7,
32 .active_low = 1,
33 - .default_trigger = "default-on",
34 },
35 {
36 - .name = "stop",
37 - .gpio = 1,
38 + .name = "eth",
39 + .gpio = 35,
40 .active_low = 1,
41 },
42 },
43 @@ -855,6 +854,7 @@ static struct platform_device bcm63xx_gp
44 int __init board_register_devices(void)
45 {
46 u32 val;
47 + int led_count = 0;
48 int button_count = 0;
49
50 if (board.has_pccard)
51 @@ -902,7 +902,11 @@ int __init board_register_devices(void)
52
53 platform_device_register_simple("GPIODEV", 0, &gpiodev_resource, 1);
54
55 - bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds);
56 + /* count number of LEDs defined by this device */
57 + while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name)
58 + led_count++;
59 +
60 + bcm63xx_led_data.num_leds = led_count;
61 bcm63xx_led_data.leds = board.leds;
62
63 platform_device_register(&bcm63xx_gpio_leds);
This page took 0.047083 seconds and 5 git commands to generate.