Skip to content

Commit

Permalink
Fixed charge control for T420(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
ginkel committed Jun 1, 2011
1 parent c87dcd8 commit 8c606b4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
31 changes: 31 additions & 0 deletions debian/patches/05_t420-chargecontrol.patch
Original file line number Diff line number Diff line change
@@ -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? */
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -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.