public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: xinliang <z.liuxinliang@hisilicon.com>
To: Chuhong Yuan <hslester96@gmail.com>
Cc: Rongrong Zou <zourongrong@gmail.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/hisilicon: Use dev_get_drvdata
Date: Mon, 26 Aug 2019 17:10:51 +0800	[thread overview]
Message-ID: <5D63A21B.1020207@hisilicon.com> (raw)
In-Reply-To: <20190723103852.3907-1-hslester96@gmail.com>

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@gmail.com>

Chuhong, thanks for the patch. And sorry for late reply.
Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.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);
>   }



      reply	other threads:[~2019-08-26  9:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 10:38 [PATCH] drm/hisilicon: Use dev_get_drvdata Chuhong Yuan
2019-08-26  9:10 ` xinliang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5D63A21B.1020207@hisilicon.com \
    --to=z.liuxinliang@hisilicon.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hslester96@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zourongrong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox