imxfb: correct location of callbacks in suspend and resume
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 2 Feb 2010 21:44:10 +0000 (13:44 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 9 Feb 2010 12:51:00 +0000 (04:51 -0800)
commit682efb8384326571bb180214a5d4661cc6befa41
tree03c4b98e1e187b90ae892f9d012a3da03a7dd065
parentb260729c8a49452ae9491e3cb94750687f221d2b
imxfb: correct location of callbacks in suspend and resume

commit 1ec562035ba64e724652cb12b8a770b3906e9bf5 upstream.

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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/video/imxfb.c