diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2015-08-02 20:26:52 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-08-10 22:20:46 +0300 |
commit | 53cd2fdb00aab34f91762f6345f83625a30480f0 (patch) | |
tree | fd6d98807ed921b7e2ccdd7d2257bfc9dc7083f9 /drivers/bcma/bcma_private.h | |
parent | 78623bfb6f4cbdba3183621e8e0e781611217022 (diff) | |
download | op-kernel-dev-53cd2fdb00aab34f91762f6345f83625a30480f0.zip op-kernel-dev-53cd2fdb00aab34f91762f6345f83625a30480f0.tar.gz |
bcma: fix access to host_pdev for PCIe devices
bus->host_pdev is part of a union so bus->host_pdev != NULL is probably
also true for PCIe devices, because there it accesses bus->host_pci. If
we access the dev member at the offset defined in struct
platform_device in struct pci_dev instead we probably get something
else.
This patch adds a new function which returns the host dev struct and
NULL if we do not have a host dev. When this gets registered on MIPS
brcm47xx we do not have a host dev in some situations.
This function could also be used in other places.
This problem was introduced in this commit:
commit cae761b5a6bdc597ba476a040fdcd5b4bc559b85
Author: Rafa? Mi?ecki <zajec5@gmail.com>
Date: Sun Jun 28 17:17:13 2015 +0200
bcma: populate bus DT subnodes as platform_device-s
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/bcma/bcma_private.h')
-rw-r--r-- | drivers/bcma/bcma_private.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h index 15f2b2e..38f1567 100644 --- a/drivers/bcma/bcma_private.h +++ b/drivers/bcma/bcma_private.h @@ -34,6 +34,7 @@ int __init bcma_bus_early_register(struct bcma_bus *bus); int bcma_bus_suspend(struct bcma_bus *bus); int bcma_bus_resume(struct bcma_bus *bus); #endif +struct device *bcma_bus_get_host_dev(struct bcma_bus *bus); /* scan.c */ void bcma_detect_chip(struct bcma_bus *bus); |