summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci/pt3/pt3.c
diff options
context:
space:
mode:
authorChuhong Yuan <hslester96@gmail.com>2019-07-23 13:50:14 +0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-07-25 12:45:10 +0200
commitbfe655d159af96632f4930c718e0fc5689460f98 (patch)
treeb8a240978ae690a7075c785d82adcea23e0f336b /drivers/media/pci/pt3/pt3.c
parentmedia: ov2680: fix a typo in a function name (diff)
downloadlinux-bfe655d159af96632f4930c718e0fc5689460f98.tar.xz
linux-bfe655d159af96632f4930c718e0fc5689460f98.zip
media: pci: Use dev_get_drvdata where possible
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: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/pci/pt3/pt3.c')
-rw-r--r--drivers/media/pci/pt3/pt3.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/pci/pt3/pt3.c b/drivers/media/pci/pt3/pt3.c
index 7a7afae4c84c..c0bc86793355 100644
--- a/drivers/media/pci/pt3/pt3.c
+++ b/drivers/media/pci/pt3/pt3.c
@@ -626,8 +626,7 @@ static void pt3_cleanup_adapter(struct pt3_board *pt3, int index)
static int pt3_suspend(struct device *dev)
{
- struct pci_dev *pdev = to_pci_dev(dev);
- struct pt3_board *pt3 = pci_get_drvdata(pdev);
+ struct pt3_board *pt3 = dev_get_drvdata(dev);
int i;
struct pt3_adapter *adap;
@@ -646,8 +645,7 @@ static int pt3_suspend(struct device *dev)
static int pt3_resume(struct device *dev)
{
- struct pci_dev *pdev = to_pci_dev(dev);
- struct pt3_board *pt3 = pci_get_drvdata(pdev);
+ struct pt3_board *pt3 = dev_get_drvdata(dev);
int i, ret;
struct pt3_adapter *adap;