summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
diff options
context:
space:
mode:
authorJani Nikula <ext-jani.1.nikula@nokia.com>2010-04-09 13:15:12 +0200
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-08-03 14:18:48 +0200
commitf2a8b75c137acb048a627379cf7e93b8b7c29191 (patch)
tree88ec95d05ea001f4bc62a0fcfbebba7fe1300be4 /drivers/video/omap2
parentOMAP: DSS2: Taal: Remove ESD work cancel from driver probe error handling (diff)
downloadlinux-f2a8b75c137acb048a627379cf7e93b8b7c29191.tar.xz
linux-f2a8b75c137acb048a627379cf7e93b8b7c29191.zip
OMAP: DSS2: Taal: Improve taal_power_on() error handling
Check return values and bail out on errors. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/displays/panel-taal.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index b1e968d9e8bf..2c2f1924b2c3 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -696,16 +696,32 @@ static int taal_power_on(struct omap_dss_device *dssdev)
if (id2 == 0x00 || id2 == 0xff || id2 == 0x81)
td->cabc_broken = true;
- taal_dcs_write_1(DCS_BRIGHTNESS, 0xff);
- taal_dcs_write_1(DCS_CTRL_DISPLAY, (1<<2) | (1<<5)); /* BL | BCTRL */
+ r = taal_dcs_write_1(DCS_BRIGHTNESS, 0xff);
+ if (r)
+ goto err;
- taal_dcs_write_1(DCS_PIXEL_FORMAT, 0x7); /* 24bit/pixel */
+ r = taal_dcs_write_1(DCS_CTRL_DISPLAY,
+ (1<<2) | (1<<5)); /* BL | BCTRL */
+ if (r)
+ goto err;
- taal_set_addr_mode(td->rotate, td->mirror);
- if (!td->cabc_broken)
- taal_dcs_write_1(DCS_WRITE_CABC, td->cabc_mode);
+ r = taal_dcs_write_1(DCS_PIXEL_FORMAT, 0x7); /* 24bit/pixel */
+ if (r)
+ goto err;
- taal_dcs_write_0(DCS_DISPLAY_ON);
+ r = taal_set_addr_mode(td->rotate, td->mirror);
+ if (r)
+ goto err;
+
+ if (!td->cabc_broken) {
+ r = taal_dcs_write_1(DCS_WRITE_CABC, td->cabc_mode);
+ if (r)
+ goto err;
+ }
+
+ r = taal_dcs_write_0(DCS_DISPLAY_ON);
+ if (r)
+ goto err;
r = _taal_enable_te(dssdev, td->te_enabled);
if (r)