mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
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>
This commit is contained in:
parent
4f1a7007d6
commit
bda4a850f7
1 changed files with 2 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue