summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2015-12-27 11:45:58 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-01-04 07:57:38 +0100
commitd21b02af63fd90d5fd6b8042fa5fb25f5911128d (patch)
tree39960de70d7eba181a26496566e416d71bae325b /drivers
parentdrm/fb-helper: Use proper plane mask for fb cleanup (diff)
downloadlinux-d21b02af63fd90d5fd6b8042fa5fb25f5911128d.tar.xz
linux-d21b02af63fd90d5fd6b8042fa5fb25f5911128d.zip
drm/gma500: use to_pci_dev()
Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/gma500/power.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/gma500/power.c b/drivers/gpu/drm/gma500/power.c
index b6b135fcd59c..bea8578846d1 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);