aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorRyan Mallon <rmallon@gmail.com>2012-01-27 01:28:24 -0500
committerDave Airlie <airlied@redhat.com>2012-01-27 06:52:07 -0500
commit2d8357e66df9f7593cbe23b224b4ed06aff90e73 (patch)
tree109fcb2cb068ed1fb46994db6e18b9e19899d11c /drivers/gpu
parent24a7eb7954bc22a1d514155d56a3c4cd5e9a6faa (diff)
gma500: Fix suspend/resume functions
Both the suspend and resume functions incorrectly set psbfb = to_psb_fb(NULL) outside of the loop over all of the framebuffers. Fix this by moving the assignment of psbfb inside the loop and removing the initialisation of fb. Signed-off-by: Ryan Mallon <rmallon@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/gma500/framebuffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index 791c0ef1a65b..830dfdd6bf15 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -113,12 +113,12 @@ static int psbfb_pan(struct fb_var_screeninfo *var, struct fb_info *info)
113 113
114void psbfb_suspend(struct drm_device *dev) 114void psbfb_suspend(struct drm_device *dev)
115{ 115{
116 struct drm_framebuffer *fb = 0; 116 struct drm_framebuffer *fb;
117 struct psb_framebuffer *psbfb = to_psb_fb(fb);
118 117
119 console_lock(); 118 console_lock();
120 mutex_lock(&dev->mode_config.mutex); 119 mutex_lock(&dev->mode_config.mutex);
121 list_for_each_entry(fb, &dev->mode_config.fb_list, head) { 120 list_for_each_entry(fb, &dev->mode_config.fb_list, head) {
121 struct psb_framebuffer *psbfb = to_psb_fb(fb);
122 struct fb_info *info = psbfb->fbdev; 122 struct fb_info *info = psbfb->fbdev;
123 fb_set_suspend(info, 1); 123 fb_set_suspend(info, 1);
124 drm_fb_helper_blank(FB_BLANK_POWERDOWN, info); 124 drm_fb_helper_blank(FB_BLANK_POWERDOWN, info);
@@ -129,12 +129,12 @@ void psbfb_suspend(struct drm_device *dev)
129 129
130void psbfb_resume(struct drm_device *dev) 130void psbfb_resume(struct drm_device *dev)
131{ 131{
132 struct drm_framebuffer *fb = 0; 132 struct drm_framebuffer *fb;
133 struct psb_framebuffer *psbfb = to_psb_fb(fb);
134 133
135 console_lock(); 134 console_lock();
136 mutex_lock(&dev->mode_config.mutex); 135 mutex_lock(&dev->mode_config.mutex);
137 list_for_each_entry(fb, &dev->mode_config.fb_list, head) { 136 list_for_each_entry(fb, &dev->mode_config.fb_list, head) {
137 struct psb_framebuffer *psbfb = to_psb_fb(fb);
138 struct fb_info *info = psbfb->fbdev; 138 struct fb_info *info = psbfb->fbdev;
139 fb_set_suspend(info, 0); 139 fb_set_suspend(info, 0);
140 drm_fb_helper_blank(FB_BLANK_UNBLANK, info); 140 drm_fb_helper_blank(FB_BLANK_UNBLANK, info);