ar71xx: use modules for LED triggers
[openwrt.git] / target / linux / brcm47xx / patches-3.2 / 231-bcma_reorder_sprom_fill.patch
1 --- a/arch/mips/bcm47xx/setup.c
2 +++ b/arch/mips/bcm47xx/setup.c
3 @@ -98,6 +98,7 @@ static int bcm47xx_get_sprom_ssb(struct
4 char prefix[10];
5
6 if (bus->bustype == SSB_BUSTYPE_PCI) {
7 + memset(out, 0, sizeof(struct ssb_sprom));
8 snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
9 bus->host_pci->bus->number + 1,
10 PCI_SLOT(bus->host_pci->devfn));
11 @@ -126,6 +127,7 @@ static int bcm47xx_get_invariants(struct
12 if (nvram_getenv("boardrev", buf, sizeof(buf)) >= 0)
13 iv->boardinfo.rev = (u16)simple_strtoul(buf, NULL, 0);
14
15 + memset(&iv->sprom, 0, sizeof(struct ssb_sprom));
16 bcm47xx_fill_sprom(&iv->sprom, NULL);
17
18 if (nvram_getenv("cardbus", buf, sizeof(buf)) >= 0)
19 @@ -206,12 +208,14 @@ static int bcm47xx_get_sprom_bcma(struct
20
21 switch (bus->hosttype) {
22 case BCMA_HOSTTYPE_PCI:
23 + memset(out, 0, sizeof(struct ssb_sprom));
24 snprintf(prefix, sizeof(prefix), "pci/%u/%u/",
25 bus->host_pci->bus->number + 1,
26 PCI_SLOT(bus->host_pci->devfn));
27 bcm47xx_fill_sprom(out, prefix);
28 return 0;
29 case BCMA_HOSTTYPE_SOC:
30 + memset(out, 0, sizeof(struct ssb_sprom));
31 bcm47xx_fill_sprom_ethernet(out, NULL);
32 core = bcma_find_core(bus, BCMA_CORE_80211);
33 if (core) {
34 --- a/arch/mips/bcm47xx/sprom.c
35 +++ b/arch/mips/bcm47xx/sprom.c
36 @@ -555,8 +555,6 @@ void bcm47xx_fill_sprom_ethernet(struct
37
38 void bcm47xx_fill_sprom(struct ssb_sprom *sprom, const char *prefix)
39 {
40 - memset(sprom, 0, sizeof(struct ssb_sprom));
41 -
42 bcm47xx_fill_sprom_ethernet(sprom, prefix);
43
44 nvram_read_u8(prefix, NULL, "sromrev", &sprom->revision, 0);
This page took 0.048347 seconds and 5 git commands to generate.