]> git.karo-electronics.de Git - karo-tx-linux.git/commit
backlight: grab ops_lock before testing bd->ops
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 24 Nov 2010 20:57:14 +0000 (12:57 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Mar 2011 19:44:07 +0000 (12:44 -0700)
commit5c1cd3ddd72f5ccd5f40e9e176a9cd69b8fd9506
tree3c156112be8a5d82e35cc0e6db2210e6e19ae942
parent787ee53f0f1c0d9ac1a2023bd813e1c796d1e200
backlight: grab ops_lock before testing bd->ops

commit d1d73578e053b981c3611e5a211534290d24a5eb upstream.

According to the comment describing ops_lock in the definition of struct
backlight_device and when comparing with other functions in backlight.c
the mutex must be hold when checking ops to be non-NULL.

Fixes a problem added by c835ee7f4154992e6 ("backlight: Add suspend/resume
support to the backlight core") in Jan 2009.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Richard Purdie <rpurdie@linux.intel.com>
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/backlight/backlight.c