diff options
author | Jarkko Nikula <jarkko.nikula@linux.intel.com> | 2021-06-11 14:55:58 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-06-13 19:00:17 +0300 |
commit | 93466212b9329616af2e4c7e5994d507d72e254d (patch) | |
tree | dbf89acca482b3e9a3dbd87d89ab98f85b297b20 /drivers/counter/intel-qep.c | |
parent | ac3bd9d6b11f6e7ddea30d3779b9c5d870b4ddfb (diff) | |
download | linux-93466212b9329616af2e4c7e5994d507d72e254d.tar.xz |
counter: intel-qep: Use to_pci_dev() helper
Use to_pci_dev() helper instead of container_of(d, struct pci_dev, dev);
Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Link: https://lore.kernel.org/r/20210611115558.796338-2-jarkko.nikula@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/counter/intel-qep.c')
-rw-r--r-- | drivers/counter/intel-qep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/counter/intel-qep.c b/drivers/counter/intel-qep.c index a8d3dccecc0f..8d7ae28fbd67 100644 --- a/drivers/counter/intel-qep.c +++ b/drivers/counter/intel-qep.c @@ -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); @@ -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); /* |