mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 16:37:50 +00:00
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>
This commit is contained in:
parent
f6d2b63adb
commit
c1233578a2
1 changed files with 2 additions and 4 deletions
|
@ -80,16 +80,14 @@ static struct drm_driver bochs_driver = {
|
||||||
#ifdef CONFIG_PM_SLEEP
|
#ifdef CONFIG_PM_SLEEP
|
||||||
static int bochs_pm_suspend(struct device *dev)
|
static int bochs_pm_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev = to_pci_dev(dev);
|
struct drm_device *drm_dev = dev_get_drvdata(dev);
|
||||||
struct drm_device *drm_dev = pci_get_drvdata(pdev);
|
|
||||||
|
|
||||||
return drm_mode_config_helper_suspend(drm_dev);
|
return drm_mode_config_helper_suspend(drm_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int bochs_pm_resume(struct device *dev)
|
static int bochs_pm_resume(struct device *dev)
|
||||||
{
|
{
|
||||||
struct pci_dev *pdev = to_pci_dev(dev);
|
struct drm_device *drm_dev = dev_get_drvdata(dev);
|
||||||
struct drm_device *drm_dev = pci_get_drvdata(pdev);
|
|
||||||
|
|
||||||
return drm_mode_config_helper_resume(drm_dev);
|
return drm_mode_config_helper_resume(drm_dev);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue