summaryrefslogtreecommitdiff
path: root/include/linux/bcma/bcma.h
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2019-01-02 02:00:01 +0300
committerKalle Valo <kvalo@codeaurora.org>2019-01-10 14:39:18 +0300
commit5a1c18b761ddb299a06746948b9ec2814b04fa92 (patch)
tree163725e7719d68dab4ad9cb52d6f060177e45b59 /include/linux/bcma/bcma.h
parent7fdcb8e1266093eb2ff1bc3ab430daf4775388ad (diff)
downloadlinux-5a1c18b761ddb299a06746948b9ec2814b04fa92.tar.xz
bcma: keep a direct pointer to the struct device
Accessing struct device is pretty useful/common so having a direct pointer: 1) Simplifies some code 2) Makes bcma_bus_get_host_dev() unneeded 3) Allows further improvements like using dev_* printing helpers Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'include/linux/bcma/bcma.h')
-rw-r--r--include/linux/bcma/bcma.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h
index ef61f3607e99..60b94b944e9f 100644
--- a/include/linux/bcma/bcma.h
+++ b/include/linux/bcma/bcma.h
@@ -332,6 +332,8 @@ extern int bcma_arch_register_fallback_sprom(
struct ssb_sprom *out));
struct bcma_bus {
+ struct device *dev;
+
/* The MMIO area. */
void __iomem *mmio;
@@ -339,14 +341,7 @@ struct bcma_bus {
enum bcma_hosttype hosttype;
bool host_is_pcie2; /* Used for BCMA_HOSTTYPE_PCI only */
- union {
- /* Pointer to the PCI bus (only for BCMA_HOSTTYPE_PCI) */
- struct pci_dev *host_pci;
- /* Pointer to the SDIO device (only for BCMA_HOSTTYPE_SDIO) */
- struct sdio_func *host_sdio;
- /* Pointer to platform device (only for BCMA_HOSTTYPE_SOC) */
- struct platform_device *host_pdev;
- };
+ struct pci_dev *host_pci; /* PCI bus pointer (BCMA_HOSTTYPE_PCI only) */
struct bcma_chipinfo chipinfo;