diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2019-01-01 18:00:01 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-01-10 06:39:18 -0500 |
commit | 5a1c18b761ddb299a06746948b9ec2814b04fa92 (patch) | |
tree | 163725e7719d68dab4ad9cb52d6f060177e45b59 /include/linux/bcma | |
parent | 7fdcb8e1266093eb2ff1bc3ab430daf4775388ad (diff) |
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')
-rw-r--r-- | include/linux/bcma/bcma.h | 11 |
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( | |||
332 | struct ssb_sprom *out)); | 332 | struct ssb_sprom *out)); |
333 | 333 | ||
334 | struct bcma_bus { | 334 | struct bcma_bus { |
335 | struct device *dev; | ||
336 | |||
335 | /* The MMIO area. */ | 337 | /* The MMIO area. */ |
336 | void __iomem *mmio; | 338 | void __iomem *mmio; |
337 | 339 | ||
@@ -339,14 +341,7 @@ struct bcma_bus { | |||
339 | 341 | ||
340 | enum bcma_hosttype hosttype; | 342 | enum bcma_hosttype hosttype; |
341 | bool host_is_pcie2; /* Used for BCMA_HOSTTYPE_PCI only */ | 343 | bool host_is_pcie2; /* Used for BCMA_HOSTTYPE_PCI only */ |
342 | union { | 344 | struct pci_dev *host_pci; /* PCI bus pointer (BCMA_HOSTTYPE_PCI only) */ |
343 | /* Pointer to the PCI bus (only for BCMA_HOSTTYPE_PCI) */ | ||
344 | struct pci_dev *host_pci; | ||
345 | /* Pointer to the SDIO device (only for BCMA_HOSTTYPE_SDIO) */ | ||
346 | struct sdio_func *host_sdio; | ||
347 | /* Pointer to platform device (only for BCMA_HOSTTYPE_SOC) */ | ||
348 | struct platform_device *host_pdev; | ||
349 | }; | ||
350 | 345 | ||
351 | struct bcma_chipinfo chipinfo; | 346 | struct bcma_chipinfo chipinfo; |
352 | 347 | ||