diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2019-01-02 00:00:01 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-01-10 12:39:18 +0100 |
commit | 5a1c18b761ddb299a06746948b9ec2814b04fa92 (patch) | |
tree | 163725e7719d68dab4ad9cb52d6f060177e45b59 /drivers/bcma/host_soc.c | |
parent | rsi: add support for hardware scan offload (diff) | |
download | linux-5a1c18b761ddb299a06746948b9ec2814b04fa92.tar.xz linux-5a1c18b761ddb299a06746948b9ec2814b04fa92.zip |
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 'drivers/bcma/host_soc.c')
-rw-r--r-- | drivers/bcma/host_soc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/bcma/host_soc.c b/drivers/bcma/host_soc.c index 2dce34789329..c8073b509a2b 100644 --- a/drivers/bcma/host_soc.c +++ b/drivers/bcma/host_soc.c @@ -179,7 +179,6 @@ int __init bcma_host_soc_register(struct bcma_soc *soc) /* Host specific */ bus->hosttype = BCMA_HOSTTYPE_SOC; bus->ops = &bcma_host_soc_ops; - bus->host_pdev = NULL; /* Initialize struct, detect chip */ bcma_init_bus(bus); @@ -213,6 +212,8 @@ static int bcma_host_soc_probe(struct platform_device *pdev) if (!bus) return -ENOMEM; + bus->dev = dev; + /* Map MMIO */ bus->mmio = of_iomap(np, 0); if (!bus->mmio) @@ -221,7 +222,6 @@ static int bcma_host_soc_probe(struct platform_device *pdev) /* Host specific */ bus->hosttype = BCMA_HOSTTYPE_SOC; bus->ops = &bcma_host_soc_ops; - bus->host_pdev = pdev; /* Initialize struct, detect chip */ bcma_init_bus(bus); |