[PATCH 2.4.21-rc1] sonypi fixes

Stelian Pop (stelian.pop@fr.alcove.com)
Wed, 23 Apr 2003 10:04:15 +0200


Hi,

I've already send this once or twice, but it hasn't been applied yet
to the 2.4 tree.

I've attached below a smaller patch, containing only the obviously
correct changes, so there is no risk involved in applying this.

Original credit goes to Adrian Bunk for the .text.exit related
changes and to Daniel K. for the battery #defines.

Marcelo, please apply.

Stelian.

===== drivers/char/sonypi.c 1.14 vs edited =====
--- 1.14/drivers/char/sonypi.c Tue Feb 18 12:33:33 2003
+++ edited/drivers/char/sonypi.c Mon Mar 31 16:39:06 2003
@@ -162,7 +162,7 @@
}

/* Disables the device - this comes from the AML code in the ACPI bios */
-static void __devexit sonypi_type1_dis(void) {
+static void sonypi_type1_dis(void) {
u32 v;

pci_read_config_dword(sonypi_device.dev, SONYPI_G10A, &v);
@@ -174,7 +174,7 @@
outl(v, SONYPI_IRQ_PORT);
}

-static void __devexit sonypi_type2_dis(void) {
+static void sonypi_type2_dis(void) {
if (ec_write(SONYPI_SHIB, 0))
printk(KERN_WARNING "ec_write failed\n");
if (ec_write(SONYPI_SLOB, 0))
@@ -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.pop@fr.alcove.com>
Alcove - http://www.alcove.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/