]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
lcd: fix oops if driver only interested in .set_power
authorBen Dooks <ben-linux@fluff.org>
Wed, 19 Nov 2008 23:36:25 +0000 (15:36 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Nov 2008 02:49:58 +0000 (18:49 -0800)
commitb3b4dc8840a8fdbe495723d35cd976d781fd42fa
tree4cacf1e1b4c4f71906ff888bcf2b0acc4022bf3c
parentc267fd777a478d74fa8959628538b64088f67fd2
lcd: fix oops if driver only interested in .set_power

The LCD driver core calls LCD drivers when either the blanking state or
the display mode has changed, but does not make any check to see if the
called driver has a .set_mode method.

This means if a driver only has a .set_power method then the system will
OOPS on changing mode (and with the console semaphore held so you cannot
easily see the problem).

Fix the problem by ensuring that either callback is valid before use.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/backlight/lcd.c