diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-07-23 04:29:19 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-08-06 08:25:28 -0400 |
commit | 9236c1250cb7c6c645a658485efc2f99d57e96c2 (patch) | |
tree | c635af85b16107bb09560308f32ea6b6ae7925e6 | |
parent | 3457f86da60de73705bce8fe32a36651441e639e (diff) |
bcma: Use dev_get_drvdata
Instead of using to_pci_dev + pci_get_drvdata,
use dev_get_drvdata to make code simpler.
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/bcma/host_pci.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c index f52239feb4cb..69c10a7b7c61 100644 --- a/drivers/bcma/host_pci.c +++ b/drivers/bcma/host_pci.c | |||
@@ -260,8 +260,7 @@ static void bcma_host_pci_remove(struct pci_dev *dev) | |||
260 | #ifdef CONFIG_PM_SLEEP | 260 | #ifdef CONFIG_PM_SLEEP |
261 | static int bcma_host_pci_suspend(struct device *dev) | 261 | static int bcma_host_pci_suspend(struct device *dev) |
262 | { | 262 | { |
263 | struct pci_dev *pdev = to_pci_dev(dev); | 263 | struct bcma_bus *bus = dev_get_drvdata(dev); |
264 | struct bcma_bus *bus = pci_get_drvdata(pdev); | ||
265 | 264 | ||
266 | bus->mapped_core = NULL; | 265 | bus->mapped_core = NULL; |
267 | 266 | ||
@@ -270,8 +269,7 @@ static int bcma_host_pci_suspend(struct device *dev) | |||
270 | 269 | ||
271 | static int bcma_host_pci_resume(struct device *dev) | 270 | static int bcma_host_pci_resume(struct device *dev) |
272 | { | 271 | { |
273 | struct pci_dev *pdev = to_pci_dev(dev); | 272 | struct bcma_bus *bus = dev_get_drvdata(dev); |
274 | struct bcma_bus *bus = pci_get_drvdata(pdev); | ||
275 | 273 | ||
276 | return bcma_bus_resume(bus); | 274 | return bcma_bus_resume(bus); |
277 | } | 275 | } |