kernel: update bcma up to 2014-10-27
[lede.git] / target / linux / generic / patches-3.18 / 025-bcma_backport.patch
1 --- a/drivers/bcma/bcma_private.h
2 +++ b/drivers/bcma/bcma_private.h
3 @@ -24,6 +24,7 @@ struct bcma_bus;
4  /* main.c */
5  bool bcma_wait_value(struct bcma_device *core, u16 reg, u32 mask, u32 value,
6                      int timeout);
7 +void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core);
8  int bcma_bus_register(struct bcma_bus *bus);
9  void bcma_bus_unregister(struct bcma_bus *bus);
10  int __init bcma_bus_early_register(struct bcma_bus *bus,
11 --- a/drivers/bcma/main.c
12 +++ b/drivers/bcma/main.c
13 @@ -169,10 +169,8 @@ static void bcma_of_fill_device(struct p
14  }
15  #endif /* CONFIG_OF */
16  
17 -static void bcma_register_core(struct bcma_bus *bus, struct bcma_device *core)
18 +void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core)
19  {
20 -       int err;
21 -
22         core->dev.release = bcma_release_core_dev;
23         core->dev.bus = &bcma_bus_type;
24         dev_set_name(&core->dev, "bcma%d:%d", bus->num, core->core_index);
25 @@ -196,6 +194,11 @@ static void bcma_register_core(struct bc
26         case BCMA_HOSTTYPE_SDIO:
27                 break;
28         }
29 +}
30 +
31 +static void bcma_register_core(struct bcma_bus *bus, struct bcma_device *core)
32 +{
33 +       int err;
34  
35         err = device_register(&core->dev);
36         if (err) {
37 --- a/drivers/bcma/scan.c
38 +++ b/drivers/bcma/scan.c
39 @@ -505,6 +505,7 @@ int bcma_bus_scan(struct bcma_bus *bus)
40                 bus->nr_cores++;
41                 other_core = bcma_find_core_reverse(bus, core->id.id);
42                 core->core_unit = (other_core == NULL) ? 0 : other_core->core_unit + 1;
43 +               bcma_prepare_core(bus, core);
44  
45                 bcma_info(bus, "Core %d found: %s (manuf 0x%03X, id 0x%03X, rev 0x%02X, class 0x%X)\n",
46                           core->core_index, bcma_device_name(&core->id),