]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] fix ec_read using wrong #define's in sonypi driver.
authorStelian Pop <stelian@popies.net>
Tue, 1 Apr 2003 13:09:06 +0000 (05:09 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 1 Apr 2003 13:09:06 +0000 (05:09 -0800)
Damn, a copy and paste error and nobody noticed until now.

From Daniel K.

drivers/char/sonypi.c

index dbfbc57a32b5e034b9c241c50265389694af4ca3..343a4c425ffeb1da829025e27cdd8efa3696db62 100644 (file)
@@ -532,7 +532,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp,
                        ret = -EFAULT;
                break;
        case SONYPI_IOCGBAT1REM:
-               if (ec_read16(SONYPI_BAT1_FULL, &val16)) {
+               if (ec_read16(SONYPI_BAT1_LEFT, &val16)) {
                        ret = -EIO;
                        break;
                }
@@ -540,7 +540,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp,
                        ret = -EFAULT;
                break;
        case SONYPI_IOCGBAT2CAP:
-               if (ec_read16(SONYPI_BAT1_FULL, &val16)) {
+               if (ec_read16(SONYPI_BAT2_FULL, &val16)) {
                        ret = -EIO;
                        break;
                }
@@ -548,7 +548,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp,
                        ret = -EFAULT;
                break;
        case SONYPI_IOCGBAT2REM:
-               if (ec_read16(SONYPI_BAT1_FULL, &val16)) {
+               if (ec_read16(SONYPI_BAT2_LEFT, &val16)) {
                        ret = -EIO;
                        break;
                }