]> Devoid-pointer.net GitWeb - omnibook.git/commitdiff
* Disable blank for TSM40 class laptop
authorMathieu Bérard <mathieu.berard@crans.org>
Thu, 21 Sep 2006 14:04:04 +0000 (14:04 +0000)
committerMathieu Bérard <mathieu.berard@crans.org>
Thu, 21 Sep 2006 14:04:04 +0000 (14:04 +0000)
blank.c

diff --git a/blank.c b/blank.c
index a69c78e6818b8cf40320a12c9607b6c338471717..7380412b0658e9f5a23d8e70ce40f2d895003265 100644 (file)
--- a/blank.c
+++ b/blank.c
@@ -35,6 +35,9 @@ int omnibook_lcd_blank(int blank)
 {
        int retval = 0;
 
+       if(!blank_driver.io_op)
+               return -ENODEV;
+
        if (blank_driver.io_op->backend == PIO)
                omnibook_apply_write_mask(blank_driver.io_op, blank);
        else if (blank_driver.io_op->backend == KBC || blank_driver.io_op->backend == CDI)
@@ -108,7 +111,7 @@ static int omnibook_console_blank_write(char *buffer, struct omnibook_operation
 }
 
 static int __init omnibook_console_blank_init(struct omnibook_operation *io_op)
-{
+{      
        return console_blank_register_hook();
 }
 
@@ -119,7 +122,7 @@ static void __exit omnibook_console_blank_cleanup(struct omnibook_operation *io_
 
 static struct omnibook_tbl blank_table[] __initdata = {
        {TSM30X, {CDI, 0, TSM100_BLANK_INDEX, 0, TSM100_LCD_OFF, TSM100_LCD_ON}},
-       {XE3GF | XE3GC | AMILOD | TSP10 | TSM30X | TSM40,
+       {XE3GF | XE3GC | AMILOD | TSP10 | TSM30X,
         COMMAND(KBC, OMNIBOOK_KBC_CMD_LCD_OFF, OMNIBOOK_KBC_CMD_LCD_ON)},
        {OB500 | OB6000 | XE2, {PIO, OB500_GPO1, OB500_GPO1, 0, -OB500_BKLT_MASK, OB500_BKLT_MASK}},
        {OB510 | OB6100, {PIO, OB510_GPO2, OB510_GPO2, 0, -OB510_BKLT_MASK, OB510_BKLT_MASK}},
@@ -134,7 +137,7 @@ static struct omnibook_feature __declared_feature blank_driver = {
        .init = omnibook_console_blank_init,
        .exit = omnibook_console_blank_cleanup,
        .ectypes =
-           XE3GF | XE3GC | OB500 | OB510 | OB6000 | OB6100 | XE2 | AMILOD | TSP10 | TSM30X | TSM40,
+           XE3GF | XE3GC | OB500 | OB510 | OB6000 | OB6100 | XE2 | AMILOD | TSP10 | TSM30X,
        .tbl = blank_table,
 };