]> Devoid-pointer.net GitWeb - omnibook.git/commitdiff
* Fix bug in init.c: If specific feature init function
authorMathieu Bérard <mathieu.berard@crans.org>
Sat, 9 Sep 2006 03:00:20 +0000 (03:00 +0000)
committerMathieu Bérard <mathieu.berard@crans.org>
Sat, 9 Sep 2006 03:00:20 +0000 (03:00 +0000)
  fail we have to decrement kref on backend
* Fix forgotten TSM40 table entry in display.c
* Add printk in case of smi command error

display.c
init.c
nbsmi.c
omnibook.h
wireless.c

index 8f3b50b92bb7e2ff6c4c31c0862b6d8f8980266e..f582c703c74cb47f6c9ea2ab4077b6431b6da44a 100644 (file)
--- a/display.c
+++ b/display.c
@@ -82,6 +82,7 @@ static int __init omnibook_display_init(struct omnibook_operation *io_op)
 
 static struct omnibook_tbl display_table[] __initdata = {
        { TSM30X,                               {ACPI, }},
+       { TSM40,                                {SMI, }},
        { XE3GF|TSP10|TSM30X|TSM40,         SIMPLE_BYTE(EC,XE3GF_STA1,XE3GF_SHDD_MASK)},
        { XE3GC,                            SIMPLE_BYTE(EC,XE3GC_STA1,XE3GC_CRTI_MASK)},
        { OB500|OB510|OB6000|OB6100|XE4500, SIMPLE_BYTE(EC,OB500_STA1,OB500_CRTS_MASK)},
diff --git a/init.c b/init.c
index b39face3ae8d5889a873fde237489ccb2fa91fad..0e761100c9b4b3b9c9120683eed7c7bfa1188627 100644 (file)
--- a/init.c
+++ b/init.c
@@ -220,9 +220,12 @@ static int __init omnibook_init(struct omnibook_feature *feature)
 /*
  * Specific feature init code
  */
-       if (feature->init && (retval = feature->init(feature->io_op)))
+       if (feature->init && (retval = feature->init(feature->io_op))) {
+               printk(O_ERR "Init function of %s failed with error %i.\n",
+                       feature->name,
+                       retval);
                goto err;
-
+       }
 /*
  * procfs file setup
  */
@@ -260,6 +263,8 @@ static int __init omnibook_init(struct omnibook_feature *feature)
        list_add_tail(&feature->list, &omnibook_available_feature->list);
        return 0;
 err:
+       if (feature->io_op && feature->io_op->backend->exit)
+               feature->io_op->backend->exit(feature->io_op);
        kfree(feature->io_op);
        return retval;
 }
diff --git a/nbsmi.c b/nbsmi.c
index 7734d73d0084b689371d564e762dff42602784f9..0e3bdbc7376158d63b6a814b718bc9b345976913 100644 (file)
--- a/nbsmi.c
+++ b/nbsmi.c
@@ -175,6 +175,9 @@ static int nbsmi_smi_command(u16 function,const u8 *inputbuffer, u8 *outputbuffe
                        BUG();
        }
 
+       if(retval)
+               printk(O_ERR "smi_command failed with error %i.\n", retval);
+
        for(count = 0; count < BUFFER_SIZE; count++) {
                outb( count + start_offset, RTC_PORT(2) );
                *(outputbuffer + count) = inb( RTC_PORT(3) );
index 451f2702d0adcac33835bc99460af1e8a5827d1e..d3b1db76a87523b7dd1b83b4368ab56348adf732 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #define OMNIBOOK_MODULE_NAME           "omnibook"
-#define OMNIBOOK_MODULE_VERSION                "2.20060816"
+#define OMNIBOOK_MODULE_VERSION                "2.20060000"
 
 /*
  * EC types
index 91e2ec28991d32262282ae842f17a968da1b7d64..bc9782a65710ee0c8b5b6bfbc76951597c4a3528 100644 (file)
@@ -82,8 +82,8 @@ static int __init omnibook_wifi_init(struct omnibook_operation *io_op)
  * Shared with bluetooth.c
  */
 struct omnibook_tbl wireless_table[] __initdata = {
-       { TSM30X, {ACPI, 0, 0, 0, 0, 0}}, /* stubs to select backend */
-       { TSM40,  {SMI, 0, 0, 0, 0, 0}}, /* stubs to select backend */
+       { TSM30X, {ACPI,}}, /* stubs to select backend */
+       { TSM40,  {SMI,}}, /* stubs to select backend */
        { 0,}
 };