Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9236c125 authored by Chuhong Yuan's avatar Chuhong Yuan Committed by Kalle Valo
Browse files

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: default avatarChuhong Yuan <hslester96@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 3457f86d
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -260,8 +260,7 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
#ifdef CONFIG_PM_SLEEP
#ifdef CONFIG_PM_SLEEP
static int bcma_host_pci_suspend(struct device *dev)
static int bcma_host_pci_suspend(struct device *dev)
{
{
	struct pci_dev *pdev = to_pci_dev(dev);
	struct bcma_bus *bus = dev_get_drvdata(dev);
	struct bcma_bus *bus = pci_get_drvdata(pdev);


	bus->mapped_core = NULL;
	bus->mapped_core = NULL;


@@ -270,8 +269,7 @@ static int bcma_host_pci_suspend(struct device *dev)


static int bcma_host_pci_resume(struct device *dev)
static int bcma_host_pci_resume(struct device *dev)
{
{
	struct pci_dev *pdev = to_pci_dev(dev);
	struct bcma_bus *bus = dev_get_drvdata(dev);
	struct bcma_bus *bus = pci_get_drvdata(pdev);


	return bcma_bus_resume(bus);
	return bcma_bus_resume(bus);
}
}