Skip to content

Commit

Permalink
counter: intel-qep: Use to_pci_dev() helper
Browse files Browse the repository at this point in the history
Use to_pci_dev() helper instead of container_of(d, struct pci_dev, dev);

Suggested-by: Jonathan Cameron <[email protected]>
Signed-off-by: Jarkko Nikula <[email protected]>
Acked-by: William Breathitt Gray <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
jhnikula authored and jic23 committed Jun 13, 2021
1 parent ac3bd9d commit 9346621
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/counter/intel-qep.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ static void intel_qep_remove(struct pci_dev *pci)

static int __maybe_unused intel_qep_suspend(struct device *dev)
{
struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
struct pci_dev *pdev = to_pci_dev(dev);
struct intel_qep *qep = pci_get_drvdata(pdev);

qep->qepcon = intel_qep_readl(qep, INTEL_QEPCON);
Expand All @@ -487,7 +487,7 @@ static int __maybe_unused intel_qep_suspend(struct device *dev)

static int __maybe_unused intel_qep_resume(struct device *dev)
{
struct pci_dev *pdev = container_of(dev, struct pci_dev, dev);
struct pci_dev *pdev = to_pci_dev(dev);
struct intel_qep *qep = pci_get_drvdata(pdev);

/*
Expand Down

0 comments on commit 9346621

Please sign in to comment.