Commit 31cfe2a7 authored by Stelian Pop's avatar Stelian Pop Committed by Linus Torvalds

[PATCH] fix ec_read using wrong #define's in sonypi driver.

Damn, a copy and paste error and nobody noticed until now.

From Daniel K.
parent 84486c2e
...@@ -532,7 +532,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp, ...@@ -532,7 +532,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp,
ret = -EFAULT; ret = -EFAULT;
break; break;
case SONYPI_IOCGBAT1REM: case SONYPI_IOCGBAT1REM:
if (ec_read16(SONYPI_BAT1_FULL, &val16)) { if (ec_read16(SONYPI_BAT1_LEFT, &val16)) {
ret = -EIO; ret = -EIO;
break; break;
} }
...@@ -540,7 +540,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp, ...@@ -540,7 +540,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp,
ret = -EFAULT; ret = -EFAULT;
break; break;
case SONYPI_IOCGBAT2CAP: case SONYPI_IOCGBAT2CAP:
if (ec_read16(SONYPI_BAT1_FULL, &val16)) { if (ec_read16(SONYPI_BAT2_FULL, &val16)) {
ret = -EIO; ret = -EIO;
break; break;
} }
...@@ -548,7 +548,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp, ...@@ -548,7 +548,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp,
ret = -EFAULT; ret = -EFAULT;
break; break;
case SONYPI_IOCGBAT2REM: case SONYPI_IOCGBAT2REM:
if (ec_read16(SONYPI_BAT1_FULL, &val16)) { if (ec_read16(SONYPI_BAT2_LEFT, &val16)) {
ret = -EIO; ret = -EIO;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment