drm/qxl: Use dev_get_drvdata where possible
Subsystems (4)
PATCH 1/1 drm/qxl: 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 <[email protected]>
--- drivers/gpu/drm/qxl/qxl_drv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/qxl/qxl_drv.c +2 -4
@@ -206,16 +206,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); }
Signature · 1 line
2.20.1
Quoted 4 lines · Chuhong Yuan
Instead of using
to_pci_dev+pci_get_drvdata,
usedev_get_drvdatato make code simpler.Signed-off-by Chuhong Yuan <[email protected]>
Queued for drm-misc-next (the bochs patch too).
thanks,
Gerd
Quoted 4 lines · Chuhong Yuan
Instead of using
to_pci_dev+pci_get_drvdata,
usedev_get_drvdatato make code simpler.Signed-off-by Chuhong Yuan <[email protected]>
Queued for drm-misc-next (the bochs patch too).
thanks,
Gerd