aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/displays/panel-taal.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index aaf5d308a046..d2e2ac7444e0 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -290,24 +290,26 @@ static int taal_bl_update_status(struct backlight_device *dev)
290 290
291 dev_dbg(&dssdev->dev, "update brightness to %d\n", level); 291 dev_dbg(&dssdev->dev, "update brightness to %d\n", level);
292 292
293 mutex_lock(&td->lock);
294
293 if (td->use_dsi_bl) { 295 if (td->use_dsi_bl) {
294 if (td->enabled) { 296 if (td->enabled) {
295 dsi_bus_lock(); 297 dsi_bus_lock();
296 r = taal_dcs_write_1(DCS_BRIGHTNESS, level); 298 r = taal_dcs_write_1(DCS_BRIGHTNESS, level);
297 dsi_bus_unlock(); 299 dsi_bus_unlock();
298 if (r) 300 } else {
299 return r; 301 r = 0;
300 } 302 }
301 } else { 303 } else {
302 if (!dssdev->set_backlight) 304 if (!dssdev->set_backlight)
303 return -EINVAL; 305 r = -EINVAL;
304 306 else
305 r = dssdev->set_backlight(dssdev, level); 307 r = dssdev->set_backlight(dssdev, level);
306 if (r)
307 return r;
308 } 308 }
309 309
310 return 0; 310 mutex_unlock(&td->lock);
311
312 return r;
311} 313}
312 314
313static int taal_bl_get_intensity(struct backlight_device *dev) 315static int taal_bl_get_intensity(struct backlight_device *dev)