diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2017-03-03 13:34:14 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-03-20 20:12:00 +0300 |
commit | 5e48a4cd2ee916a98fbc36c944b21a7c935cf4f4 (patch) | |
tree | 451c20e811e97332a0e438f1e43295356600de90 /drivers/bcma | |
parent | 48d1977655341f1e004beb81eda8e93316c55963 (diff) | |
download | linux-5e48a4cd2ee916a98fbc36c944b21a7c935cf4f4.tar.xz |
bcma: use helper function to set core dev's parent
A tiny code deduplication thanks to the bcma_bus_get_host_dev.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/bcma')
-rw-r--r-- | drivers/bcma/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index 8957137fc368..e6f3810d594d 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c @@ -239,17 +239,16 @@ void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core) core->dev.release = bcma_release_core_dev; core->dev.bus = &bcma_bus_type; dev_set_name(&core->dev, "bcma%d:%d", bus->num, core->core_index); + core->dev.parent = bcma_bus_get_host_dev(bus); switch (bus->hosttype) { case BCMA_HOSTTYPE_PCI: - core->dev.parent = &bus->host_pci->dev; core->dma_dev = &bus->host_pci->dev; core->irq = bus->host_pci->irq; break; case BCMA_HOSTTYPE_SOC: if (IS_ENABLED(CONFIG_OF) && bus->host_pdev) { core->dma_dev = &bus->host_pdev->dev; - core->dev.parent = &bus->host_pdev->dev; if (core->dev.parent) bcma_of_fill_device(core->dev.parent, core); } else { |