From 5e1920cdf8925ea08c21582b61857900573b8f75 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mathieu=20B=C3=A9rard?= Date: Thu, 21 Sep 2006 14:04:04 +0000 Subject: [PATCH] * Disable blank for TSM40 class laptop --- blank.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/blank.c b/blank.c index a69c78e..7380412 100644 --- 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, }; -- 2.43.5