Messages in this thread Patch in this message | | | Date | Thu, 23 Jan 2003 14:29:14 +0100 | From | Stelian Pop <> | Subject | [PATCH 2.4-bk] make sonypi use ec_read/ec_write from ACPI patch |
| |
Hi,
This patch avoids a conflict between the sonypi driver and the latest ACPI patch, by letting sonypi use the ACPI provided functions ec_read/ec_write.
A variant of this patch (without the conditional testing of the ACPI version) is already used in the 2.5 kernel.
Credits for the patch go to Ducrot Bruno.
Marcelo, Alan, please apply this to your trees.
Thanks,
Stelian.
===== drivers/char/sonypi.h 1.13 vs edited ===== --- 1.13/drivers/char/sonypi.h Thu Jan 9 13:46:12 2003 +++ edited/drivers/char/sonypi.h Thu Jan 23 14:19:57 2003 @@ -363,6 +363,14 @@ printk(KERN_WARNING "sonypi command failed at %s : %s (line %d)\n", __FILE__, __FUNCTION__, __LINE__); \ } +#ifdef CONFIG_ACPI +#include <linux/acpi.h> +#if (ACPI_CA_VERSION > 0x20021121) +#define USE_ACPI +#endif +#endif /* CONFIG_ACPI */ + +#ifndef USE_ACPI extern int verbose; static inline int ec_write(u8 addr, u8 value) { @@ -385,6 +393,7 @@ *value = inb_p(SONYPI_DATA_IOPORT); return 0; } +#endif /* ! USE_ACPI */ #endif /* __KERNEL__ */ -- Stelian Pop <stelian@popies.net> - 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/
| |