* [PATCH 2.4-bk] make sonypi use ec_read/ec_write from ACPI patch
@ 2003-01-23 13:29 Stelian Pop
0 siblings, 0 replies; only message in thread
From: Stelian Pop @ 2003-01-23 13:29 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Marcelo Tosatti, Alan Cox, Ducrot Bruno
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>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-01-23 13:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-23 13:29 [PATCH 2.4-bk] make sonypi use ec_read/ec_write from ACPI patch Stelian Pop
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox