Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1300515 > unrolled thread

Re: [PATCH 2/9] drm/gma500: use to_pci_dev()

Started byDaniel Vetter <daniel@ffwll.ch>
First post2016-01-04 08:00 +0100
Last post2016-01-04 08:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 2/9] drm/gma500: use to_pci_dev() Daniel Vetter <daniel@ffwll.ch> - 2016-01-04 08:00 +0100

#1300515 — Re: [PATCH 2/9] drm/gma500: use to_pci_dev()

FromDaniel Vetter <daniel@ffwll.ch>
Date2016-01-04 08:00 +0100
SubjectRe: [PATCH 2/9] drm/gma500: use to_pci_dev()
Message-ID<qN7hv-832-1@gated-at.bofh.it>
On Sun, Dec 27, 2015 at 06:45:58PM +0800, Geliang Tang wrote:
> Use to_pci_dev() instead of open-coding it.
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>

Applied to drm-misc, thanks.
-Daniel

> ---
>  drivers/gpu/drm/gma500/power.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/gma500/power.c b/drivers/gpu/drm/gma500/power.c
> index b6b135f..bea8578 100644
> --- a/drivers/gpu/drm/gma500/power.c
> +++ b/drivers/gpu/drm/gma500/power.c
> @@ -187,7 +187,7 @@ static bool gma_resume_pci(struct pci_dev *pdev)
>   */
>  int gma_power_suspend(struct device *_dev)
>  {
> -	struct pci_dev *pdev = container_of(_dev, struct pci_dev, dev);
> +	struct pci_dev *pdev = to_pci_dev(_dev);
>  	struct drm_device *dev = pci_get_drvdata(pdev);
>  	struct drm_psb_private *dev_priv = dev->dev_private;
>  
> @@ -214,7 +214,7 @@ int gma_power_suspend(struct device *_dev)
>   */
>  int gma_power_resume(struct device *_dev)
>  {
> -	struct pci_dev *pdev = container_of(_dev, struct pci_dev, dev);
> +	struct pci_dev *pdev = to_pci_dev(_dev);
>  	struct drm_device *dev = pci_get_drvdata(pdev);
>  
>  	mutex_lock(&power_mutex);
> -- 
> 2.5.0
> 
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web