[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5D63A21B.1020207@hisilicon.com>
Date: Mon, 26 Aug 2019 17:10:51 +0800
From: xinliang <z.liuxinliang@...ilicon.com>
To: Chuhong Yuan <hslester96@...il.com>
CC: Rongrong Zou <zourongrong@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/hisilicon: Use dev_get_drvdata
Hi,
On 2019/7/23 18:38, Chuhong Yuan wrote:
> Instead of using to_pci_dev + pci_get_drvdata,
> use dev_get_drvdata to make code simpler.
>
> Signed-off-by: Chuhong Yuan <hslester96@...il.com>
Chuhong, thanks for the patch. And sorry for late reply.
Acked-by: Xinliang Liu <z.liuxinliang@...ilicon.com>
Applied to drm-hisilicon-hibmc-next.
Thanks,
Xinliang
> ---
> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 6 ++----
> 1 file 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 ce89e56937b0..f0be263feff5 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> @@ -60,16 +60,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);
> }
Powered by blists - more mailing lists