From: Hauke Mehrtens Date: Sun, 2 Aug 2015 18:26:52 +0000 (+0200) Subject: bcma: fix access to host_pdev for PCIe devices X-Git-Tag: omap-for-v4.3/fixes-rc1~110^2~124^2~31 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53cd2fdb00aab34f91762f6345f83625a30480f0;p=pandora-kernel.git 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 Date: Sun Jun 28 17:17:13 2015 +0200 bcma: populate bus DT subnodes as platform_device-s Signed-off-by: Hauke Mehrtens Signed-off-by: Kalle Valo --- Reading git-diff-tree failed