public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stelian Pop <stelian@popies.net>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Ducrot Bruno <ducrot@poupinou.org>
Subject: [PATCH 2.4-bk] make sonypi use ec_read/ec_write from ACPI patch
Date: Thu, 23 Jan 2003 14:29:14 +0100	[thread overview]
Message-ID: <20030123142914.A4308@deep-space-9.dsnet> (raw)

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>

                 reply	other threads:[~2003-01-23 13:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030123142914.A4308@deep-space-9.dsnet \
    --to=stelian@popies.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=ducrot@poupinou.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox