1
0

072-bcma-from-4.12.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --- a/drivers/bcma/driver_gpio.c
  2. +++ b/drivers/bcma/driver_gpio.c
  3. @@ -185,8 +185,7 @@ int bcma_gpio_init(struct bcma_drv_cc *c
  4. chip->owner = THIS_MODULE;
  5. chip->parent = 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. - if (!IS_ENABLED(CONFIG_OF_IRQ))
  19. - return;
  20. -
  21. node = bcma_of_find_child_device(parent, core);
  22. if (node)
  23. core->dev.of_node = node;
  24. @@ -242,19 +239,18 @@ void bcma_prepare_core(struct bcma_bus *
  25. core->dev.release = bcma_release_core_dev;
  26. core->dev.bus = &bcma_bus_type;
  27. dev_set_name(&core->dev, "bcma%d:%d", bus->num, core->core_index);
  28. + core->dev.parent = bcma_bus_get_host_dev(bus);
  29. + if (core->dev.parent)
  30. + bcma_of_fill_device(core->dev.parent, core);
  31. switch (bus->hosttype) {
  32. case BCMA_HOSTTYPE_PCI:
  33. - core->dev.parent = &bus->host_pci->dev;
  34. core->dma_dev = &bus->host_pci->dev;
  35. core->irq = bus->host_pci->irq;
  36. break;
  37. case BCMA_HOSTTYPE_SOC:
  38. if (IS_ENABLED(CONFIG_OF) && bus->host_pdev) {
  39. core->dma_dev = &bus->host_pdev->dev;
  40. - core->dev.parent = &bus->host_pdev->dev;
  41. - if (core->dev.parent)
  42. - bcma_of_fill_device(core->dev.parent, core);
  43. } else {
  44. core->dev.dma_mask = &core->dev.coherent_dma_mask;
  45. core->dma_dev = &core->dev;