Skip to content

Commit

Permalink
drm/qxl: Use dev_get_drvdata where possible
Browse files Browse the repository at this point in the history
Instead of using to_pci_dev + pci_get_drvdata,
use dev_get_drvdata to make code simpler.

Signed-off-by: Chuhong Yuan <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
  • Loading branch information
WillLester authored and kraxel committed Aug 6, 2019
1 parent e7f0141 commit f6d2b63
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gpu/drm/qxl/qxl_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,14 @@ static int qxl_pm_resume(struct device *dev)

static int qxl_pm_thaw(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev);
struct drm_device *drm_dev = dev_get_drvdata(dev);

return qxl_drm_resume(drm_dev, true);
}

static int qxl_pm_freeze(struct device *dev)
{
struct pci_dev *pdev = to_pci_dev(dev);
struct drm_device *drm_dev = pci_get_drvdata(pdev);
struct drm_device *drm_dev = dev_get_drvdata(dev);

return qxl_drm_freeze(drm_dev);
}
Expand Down

0 comments on commit f6d2b63

Please sign in to comment.