diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-02-02 16:44:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-02 21:11:22 -0500 |
commit | 1ec562035ba64e724652cb12b8a770b3906e9bf5 (patch) | |
tree | 639849e4d40b124f84fd36d166187a7cee87b06d | |
parent | 4528fd0595847c2078b59f24800e751c2d6b7e41 (diff) |
imxfb: correct location of callbacks in suspend and resume
The probe function passes a pointer to a struct fb_info to
platform_set_drvdata(), so don't interpret the return value of
platform_get_drvdata() as a pointer to struct imxfb_info.
The original imxfb_info *fbi backlight_power was NULL but in imxfb_suspend
it was 4 resulting in an oops as imxfb_suspend calls
imxfb_disable_controller(fbi) which in turn has
if (fbi->backlight_power)
fbi->backlight_power(0);
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Sascha Hauer <kernel@pengutronix.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/video/imxfb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index 66358fa825f3..b4b6deceed15 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c | |||
@@ -593,7 +593,8 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf | |||
593 | */ | 593 | */ |
594 | static int imxfb_suspend(struct platform_device *dev, pm_message_t state) | 594 | static int imxfb_suspend(struct platform_device *dev, pm_message_t state) |
595 | { | 595 | { |
596 | struct imxfb_info *fbi = platform_get_drvdata(dev); | 596 | struct fb_info *info = platform_get_drvdata(dev); |
597 | struct imxfb_info *fbi = info->par; | ||
597 | 598 | ||
598 | pr_debug("%s\n", __func__); | 599 | pr_debug("%s\n", __func__); |
599 | 600 | ||
@@ -603,7 +604,8 @@ static int imxfb_suspend(struct platform_device *dev, pm_message_t state) | |||
603 | 604 | ||
604 | static int imxfb_resume(struct platform_device *dev) | 605 | static int imxfb_resume(struct platform_device *dev) |
605 | { | 606 | { |
606 | struct imxfb_info *fbi = platform_get_drvdata(dev); | 607 | struct fb_info *info = platform_get_drvdata(dev); |
608 | struct imxfb_info *fbi = info->par; | ||
607 | 609 | ||
608 | pr_debug("%s\n", __func__); | 610 | pr_debug("%s\n", __func__); |
609 | 611 | ||