From: Daniel Vetter <daniel@ffwll.ch>
To: Geliang Tang <geliangtang@163.com>
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>,
David Airlie <airlied@linux.ie>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/9] drm/gma500: use to_pci_dev()
Date: Mon, 4 Jan 2016 07:59:15 +0100 [thread overview]
Message-ID: <20160104065915.GB8076@phenom.ffwll.local> (raw)
In-Reply-To: <e57984d9af30f4d0ff377eb4087f1c5b223842d3.1451211133.git.geliangtang@163.com>
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
next prev parent reply other threads:[~2016-01-04 6:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-27 10:45 [PATCH 1/9] atm: solos-pci: " Geliang Tang
2015-12-27 10:45 ` [PATCH 2/9] drm/gma500: " Geliang Tang
2016-01-04 6:59 ` Daniel Vetter [this message]
2015-12-27 10:45 ` [PATCH 3/9] i2c: designware: " Geliang Tang
2015-12-27 12:40 ` Andy Shevchenko
2016-01-03 18:54 ` Wolfram Sang
2015-12-27 10:46 ` [PATCH 4/9] mmc: sdhci-pci: " Geliang Tang
2015-12-28 13:29 ` Ulf Hansson
2015-12-27 10:46 ` [PATCH 5/9] ipw2x00: " Geliang Tang
2015-12-31 8:30 ` Kalle Valo
2015-12-27 10:46 ` [PATCH 6/9] ssb: " Geliang Tang
2015-12-27 10:46 ` [PATCH 7/9] serial: 8250_pci: " Geliang Tang
2015-12-27 12:39 ` Andy Shevchenko
2015-12-27 14:29 ` [PATCH 7/9 v2] " Geliang Tang
2015-12-27 10:46 ` [PATCH 8/9] vme: vme_ca91cx42.c: " Geliang Tang
2015-12-27 16:46 ` Martyn Welch
2015-12-27 10:46 ` [PATCH 9/9] devres: " Geliang Tang
2015-12-28 16:19 ` Tejun Heo
2015-12-29 20:47 ` [PATCH 1/9] atm: solos-pci: " David Miller
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=20160104065915.GB8076@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=geliangtang@163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patrik.r.jakobsson@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
all inboxes | Powered by JetHome®