kernel: remove linux 3.18 support
[openwrt/staging/chunkeey.git] / target / linux / generic / pending-4.4 / 026-bcma-from-4.12.patch
1 --- a/drivers/bcma/driver_gpio.c
2 +++ b/drivers/bcma/driver_gpio.c
3 @@ -190,8 +190,7 @@ int bcma_gpio_init(struct bcma_drv_cc *c
4 chip->owner = THIS_MODULE;
5 chip->dev = bcma_bus_get_host_dev(bus);
6 #if IS_BUILTIN(CONFIG_OF)
7 - if (cc->core->bus->hosttype == BCMA_HOSTTYPE_SOC)
8 - chip->of_node = cc->core->dev.of_node;
9 + chip->of_node = cc->core->dev.of_node;
10 #endif
11 switch (bus->chipinfo.id) {
12 case BCMA_CHIP_ID_BCM4707:
13 --- a/drivers/bcma/main.c
14 +++ b/drivers/bcma/main.c
15 @@ -201,9 +201,6 @@ static void bcma_of_fill_device(struct d
16 {
17 struct device_node *node;
18
19 - if (!IS_ENABLED(CONFIG_OF_IRQ))
20 - return;
21 -
22 node = bcma_of_find_child_device(parent, core);
23 if (node)
24 core->dev.of_node = node;
25 @@ -242,19 +239,18 @@ void bcma_prepare_core(struct bcma_bus *
26 core->dev.release = bcma_release_core_dev;
27 core->dev.bus = &bcma_bus_type;
28 dev_set_name(&core->dev, "bcma%d:%d", bus->num, core->core_index);
29 + core->dev.parent = bcma_bus_get_host_dev(bus);
30 + if (core->dev.parent)
31 + bcma_of_fill_device(core->dev.parent, core);
32
33 switch (bus->hosttype) {
34 case BCMA_HOSTTYPE_PCI:
35 - core->dev.parent = &bus->host_pci->dev;
36 core->dma_dev = &bus->host_pci->dev;
37 core->irq = bus->host_pci->irq;
38 break;
39 case BCMA_HOSTTYPE_SOC:
40 if (IS_ENABLED(CONFIG_OF) && bus->host_pdev) {
41 core->dma_dev = &bus->host_pdev->dev;
42 - core->dev.parent = &bus->host_pdev->dev;
43 - if (core->dev.parent)
44 - bcma_of_fill_device(core->dev.parent, core);
45 } else {
46 core->dev.dma_mask = &core->dev.coherent_dma_mask;
47 core->dma_dev = &core->dev;