diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-07-23 12:11:04 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-08-06 09:20:58 +0200 |
commit | c1233578a2b9db920ecd9b647797967ac68dfe46 (patch) | |
tree | f2d102e770bd1a14380a3ea517f4b785b6e5a288 /drivers/gpu/drm | |
parent | drm/qxl: Use dev_get_drvdata where possible (diff) | |
download | linux-c1233578a2b9db920ecd9b647797967ac68dfe46.tar.xz linux-c1233578a2b9db920ecd9b647797967ac68dfe46.zip |
drm/bochs: Use dev_get_drvdata
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>
Link: http://patchwork.freedesktop.org/patch/msgid/20190723101103.30250-1-hslester96@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/bochs/bochs_drv.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index 46d8312ec00d..770e1625d05e 100644 --- a/drivers/gpu/drm/bochs/bochs_drv.c +++ b/drivers/gpu/drm/bochs/bochs_drv.c @@ -80,16 +80,14 @@ static struct drm_driver bochs_driver = { #ifdef CONFIG_PM_SLEEP static int bochs_pm_suspend(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 drm_mode_config_helper_suspend(drm_dev); } static int bochs_pm_resume(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 drm_mode_config_helper_resume(drm_dev); } |