]> git.baikalelectronics.ru Git - kernel.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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 24 Nov 2010 21:50:47 +0000 (06:50 +0900)
commitdb63bab388cf3a4397ed94dc20543f35bd71e7d1
tree3879428554320c30bc3ccfd0b217710e256ca36f
parentef68060438ad669b0fad092e9e57bd8b1121ffc0
backlight: grab ops_lock before testing bd->ops

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 34a47c5a376ff6f65 ("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>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/backlight/backlight.c