Permalink
Browse files

Fixed charge control for T420(s)

  • Loading branch information...
1 parent c87dcd8 commit 8c606b476b5859b2d6798e6df15aa0316ca6a206 @ginkel committed Jun 1, 2011
Showing with 32 additions and 0 deletions.
  1. +31 −0 debian/patches/05_t420-chargecontrol.patch
  2. +1 −0 debian/patches/series
@@ -0,0 +1,31 @@
+Index: tp-smapi/tp_smapi.c
+===================================================================
+--- tp-smapi.orig/tp_smapi.c 2011-06-01 15:50:57.043087877 +0200
++++ tp-smapi/tp_smapi.c 2011-06-01 15:51:03.813087881 +0200
+@@ -88,7 +88,7 @@
+ static struct { u8 rc; char *msg; int ret; } smapi_retcode[] =
+ {
+ {0x00, "OK", 0},
+- {0x53, "SMAPI fuction is not available", -ENXIO},
++ {0x53, "SMAPI function is not available", -ENXIO},
+ {0x81, "Invalid parameter", -EINVAL},
+ {0x86, "Function is not supported by SMAPI BIOS", -EOPNOTSUPP},
+ {0x90, "System error", -EIO},
+@@ -779,7 +779,7 @@
+
+ down(&smapi_mutex);
+ ret = get_thresh(bat, THRESH_STOP, &other_thresh);
+- if (ret != -EOPNOTSUPP) {
++ if (ret != -EOPNOTSUPP && ret != -ENXIO) {
+ if (ret) /* other threshold is set? */
+ goto out;
+ ret = get_real_thresh(bat, THRESH_START, NULL);
+@@ -821,7 +821,7 @@
+
+ down(&smapi_mutex);
+ ret = get_thresh(bat, THRESH_START, &other_thresh);
+- if (ret != -EOPNOTSUPP) { /* other threshold exists? */
++ if (ret != -EOPNOTSUPP && ret != -ENXIO) { /* other threshold exists? */
+ if (ret)
+ goto out;
+ /* this threshold exists? */
@@ -3,3 +3,4 @@
03_2.6.37-compatibility.patch
99_Makefile-for-Debian.patch
04_t420-whitelist.patch
+05_t420-chargecontrol.patch

0 comments on commit 8c606b4

Please sign in to comment.