diff options
author | Chuhong Yuan <hslester96@gmail.com> | 2019-07-23 13:38:53 +0300 |
---|---|---|
committer | Xinliang Liu <z.liuxinliang@hisilicon.com> | 2019-08-26 10:21:33 +0300 |
commit | bda4a850f7dc6dee141a6bdba85976c8cf686626 (patch) | |
tree | 1ed5564d8af6cff2c71c7ea4da611b82605a16ad /drivers/gpu/drm/hisilicon | |
parent | 4f1a7007d688a792b6b929220d7f68a25eb493be (diff) | |
download | linux-bda4a850f7dc6dee141a6bdba85976c8cf686626.tar.xz |
drm/hisilicon: 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>
Signed-off-by: Xinliang Liu <z.liuxinliang@hisilicon.com>
Diffstat (limited to 'drivers/gpu/drm/hisilicon')
-rw-r--r-- | drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index 5a9fa8783a4d..c103005b0a33 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c @@ -66,16 +66,14 @@ static struct drm_driver hibmc_driver = { static int __maybe_unused hibmc_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 __maybe_unused hibmc_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); } |