]> git.baikalelectronics.ru Git - kernel.git/commit
fbdev: sh_mobile_lcdcfb: fix module lock acquisition
authorAlexandre Courbot <gnurou@gmail.com>
Wed, 23 Feb 2011 08:41:50 +0000 (08:41 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 29 Mar 2011 07:04:45 +0000 (16:04 +0900)
commit5b6c74d0d504899dc972697d53cdd54eb02e8085
treea2cfbacd57e3578c3e503d1ff31bde6829652cd0
parentacd37a371a5f14d7597422e835deed0121cfce82
fbdev: sh_mobile_lcdcfb: fix module lock acquisition

Whenever the LCDC is to be started or stopped, a board callback is
checked for existence and invoked. Prior to the invokation, the
callback's module lock is also acquired, to be released once the
callback returns. However, the order of testing makes it possible for
the lock to be acquired and not released in case the callback does not
exist. This patch reorders the tests to prevent this particular case.

Signed-off-by: Alexandre Courbot <gnurou@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/video/sh_mobile_lcdcfb.c