* [patch] fix ec_read using wrong #define's in sonypi driver.
@ 2003-03-31 13:30 Daniel K.
2003-03-31 14:42 ` Stelian Pop
0 siblings, 1 reply; 2+ messages in thread
From: Daniel K. @ 2003-03-31 13:30 UTC (permalink / raw)
To: Stelian Pop; +Cc: linux-kernel
This patch will make the driver use the correct #define's when
querying battery charge.
This error sneaked into 2.4.20-pre1,
and have been present in 2.5 since 2.5.49.
The patch is for 2.4.21-pre6, but will also apply to 2.5.66
with an offset of 1 line.
Please apply.
Daniel K.
--- linux-2.4.21-pre6.vanilla/drivers/char/sonypi.c 2003-03-29 17:27:22.000000000 +0000
+++ linux-2.4.21-pre6/drivers/char/sonypi.c 2003-03-30 11:44:42.000000000 +0000
@@ -531,7 +531,7 @@
ret = -EFAULT;
break;
case SONYPI_IOCGBAT1REM:
- if (ec_read16(SONYPI_BAT1_FULL, &val16)) {
+ if (ec_read16(SONYPI_BAT1_LEFT, &val16)) {
ret = -EIO;
break;
}
@@ -539,7 +539,7 @@
ret = -EFAULT;
break;
case SONYPI_IOCGBAT2CAP:
- if (ec_read16(SONYPI_BAT1_FULL, &val16)) {
+ if (ec_read16(SONYPI_BAT2_FULL, &val16)) {
ret = -EIO;
break;
}
@@ -547,7 +547,7 @@
ret = -EFAULT;
break;
case SONYPI_IOCGBAT2REM:
- if (ec_read16(SONYPI_BAT1_FULL, &val16)) {
+ if (ec_read16(SONYPI_BAT2_LEFT, &val16)) {
ret = -EIO;
break;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] fix ec_read using wrong #define's in sonypi driver.
2003-03-31 13:30 [patch] fix ec_read using wrong #define's in sonypi driver Daniel K.
@ 2003-03-31 14:42 ` Stelian Pop
0 siblings, 0 replies; 2+ messages in thread
From: Stelian Pop @ 2003-03-31 14:42 UTC (permalink / raw)
To: Daniel K.; +Cc: linux-kernel, Linus Torvalds, Marcelo Tosatti
On Mon, Mar 31, 2003 at 01:30:45PM +0000, Daniel K. wrote:
> This patch will make the driver use the correct #define's when
> querying battery charge.
>
> This error sneaked into 2.4.20-pre1,
> and have been present in 2.5 since 2.5.49.
Damn, a copy and paste error and nobody noticed until now.
Thanks Daniel!
Linus, Marcelo, please apply it.
Stelian.
--- linux-2.4.21-pre6.vanilla/drivers/char/sonypi.c 2003-03-29 17:27:22.000000000 +0000
+++ linux-2.4.21-pre6/drivers/char/sonypi.c 2003-03-30 11:44:42.000000000 +0000
@@ -531,7 +531,7 @@
ret = -EFAULT;
break;
case SONYPI_IOCGBAT1REM:
- if (ec_read16(SONYPI_BAT1_FULL, &val16)) {
+ if (ec_read16(SONYPI_BAT1_LEFT, &val16)) {
ret = -EIO;
break;
}
@@ -539,7 +539,7 @@
ret = -EFAULT;
break;
case SONYPI_IOCGBAT2CAP:
- if (ec_read16(SONYPI_BAT1_FULL, &val16)) {
+ if (ec_read16(SONYPI_BAT2_FULL, &val16)) {
ret = -EIO;
break;
}
@@ -547,7 +547,7 @@
ret = -EFAULT;
break;
case SONYPI_IOCGBAT2REM:
- if (ec_read16(SONYPI_BAT1_FULL, &val16)) {
+ if (ec_read16(SONYPI_BAT2_LEFT, &val16)) {
ret = -EIO;
break;
}
--
Stelian Pop <stelian@popies.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-31 14:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-31 13:30 [patch] fix ec_read using wrong #define's in sonypi driver Daniel K.
2003-03-31 14:42 ` Stelian Pop
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.