diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2013-11-11 13:41:38 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-11-26 05:49:17 -0500 |
commit | c37dd677988ca50bc8bc60ab5ab053720583c168 (patch) | |
tree | 29a3aebb4a036c5db9f9ec29710c7440ccd96c80 | |
parent | 6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff) |
ARM: OMAPFB: panel-sony-acx565akm: fix bad unlock balance
When booting Nokia N900 smartphone with v3.12 + omap2plus_defconfig
(LOCKDEP enabled) and CONFIG_DISPLAY_PANEL_SONY_ACX565AKM enabled,
the following BUG is seen during the boot:
[ 7.302154] =====================================
[ 7.307128] [ BUG: bad unlock balance detected! ]
[ 7.312103] 3.12.0-los.git-2093492-00120-g5e01dc7 #3 Not tainted
[ 7.318450] -------------------------------------
[ 7.323425] kworker/u2:1/12 is trying to release lock (&ddata->mutex) at:
[ 7.330657] [<c031b760>] acx565akm_enable+0x12c/0x18c
[ 7.335998] but there are no more locks to release!
Fix by removing double unlock and handling the locking completely inside
acx565akm_panel_power_on() when doing the power on.
Reported-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: stable@vger.kernel.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/video/omap2/displays-new/panel-sony-acx565akm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c index e6d56f714ae4..d94f35dbd536 100644 --- a/drivers/video/omap2/displays-new/panel-sony-acx565akm.c +++ b/drivers/video/omap2/displays-new/panel-sony-acx565akm.c | |||
@@ -526,6 +526,8 @@ static int acx565akm_panel_power_on(struct omap_dss_device *dssdev) | |||
526 | struct omap_dss_device *in = ddata->in; | 526 | struct omap_dss_device *in = ddata->in; |
527 | int r; | 527 | int r; |
528 | 528 | ||
529 | mutex_lock(&ddata->mutex); | ||
530 | |||
529 | dev_dbg(&ddata->spi->dev, "%s\n", __func__); | 531 | dev_dbg(&ddata->spi->dev, "%s\n", __func__); |
530 | 532 | ||
531 | in->ops.sdi->set_timings(in, &ddata->videomode); | 533 | in->ops.sdi->set_timings(in, &ddata->videomode); |
@@ -614,10 +616,7 @@ static int acx565akm_enable(struct omap_dss_device *dssdev) | |||
614 | if (omapdss_device_is_enabled(dssdev)) | 616 | if (omapdss_device_is_enabled(dssdev)) |
615 | return 0; | 617 | return 0; |
616 | 618 | ||
617 | mutex_lock(&ddata->mutex); | ||
618 | r = acx565akm_panel_power_on(dssdev); | 619 | r = acx565akm_panel_power_on(dssdev); |
619 | mutex_unlock(&ddata->mutex); | ||
620 | |||
621 | if (r) | 620 | if (r) |
622 | return r; | 621 | return r; |
623 | 622 | ||