* [PATCH] drm/gma500: Use dev_get_drvdata where possible
@ 2019-07-23 10:38 Chuhong Yuan
0 siblings, 0 replies; only message in thread
From: Chuhong Yuan @ 2019-07-23 10:38 UTC (permalink / raw)
Cc: Patrik Jakobsson, David Airlie, Daniel Vetter, dri-devel,
linux-kernel, Chuhong Yuan
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>
---
drivers/gpu/drm/gma500/power.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/gma500/power.c b/drivers/gpu/drm/gma500/power.c
index bea8578846d1..d67e01ce7766 100644
--- a/drivers/gpu/drm/gma500/power.c
+++ b/drivers/gpu/drm/gma500/power.c
@@ -308,7 +308,7 @@ int psb_runtime_resume(struct device *dev)
int psb_runtime_idle(struct device *dev)
{
- struct drm_device *drmdev = pci_get_drvdata(to_pci_dev(dev));
+ struct drm_device *drmdev = dev_get_drvdata(dev);
struct drm_psb_private *dev_priv = drmdev->dev_private;
if (dev_priv->display_count)
return 0;
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-23 10:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-23 10:38 [PATCH] drm/gma500: Use dev_get_drvdata where possible Chuhong Yuan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).