From: "Németh Márton" <nm127@freemail.hu>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>,
linux-input@atrey.karlin.mff.cuni.cz,
linux-kernel@vger.kernel.org, Rodrigo Pereira <rodripe@gmail.com>
Subject: Re: [PATCH 1/3] leds-clevo-mail: export i8042_command()
Date: Tue, 17 Jul 2007 20:12:32 +0200 [thread overview]
Message-ID: <469D0690.9020408@freemail.hu> (raw)
In-Reply-To: <469C976B.3030206@freemail.hu>
From: Márton Németh <nm127@freemail.hu>
Export the i8042_command() function which manages the mutual exclusion
with the help of the i8042_lock spinlock. This lets possible to use the
i8042 hardware safely from other part of the kernel, too.
Signed-off-by: Márton Németh <nm127@freemail.hu>
---
diff -uprN linux-2.6.22.orig/drivers/input/serio/i8042.c linux-2.6.22/drivers/input/serio/i8042.c
--- linux-2.6.22.orig/drivers/input/serio/i8042.c 2007-07-09 01:32:17.000000000 +0200
+++ linux-2.6.22/drivers/input/serio/i8042.c 2007-07-17 17:03:54.000000000 +0200
@@ -20,6 +20,7 @@
#include <linux/err.h>
#include <linux/rcupdate.h>
#include <linux/platform_device.h>
+#include <linux/i8042.h>
#include <asm/io.h>
@@ -208,7 +209,7 @@ static int __i8042_command(unsigned char
return 0;
}
-static int i8042_command(unsigned char *param, int command)
+int i8042_command(unsigned char *param, int command)
{
unsigned long flags;
int retval;
@@ -219,6 +220,7 @@ static int i8042_command(unsigned char *
return retval;
}
+EXPORT_SYMBOL(i8042_command);
/*
* i8042_kbd_write() sends a byte out through the keyboard interface.
diff -uprN linux-2.6.22.orig/include/linux/i8042.h linux-2.6.22/include/linux/i8042.h
--- linux-2.6.22.orig/include/linux/i8042.h 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.6.22/include/linux/i8042.h 2007-07-17 10:52:13.000000000 +0200
@@ -0,0 +1,10 @@
+
+/* There is already a header file linux/drivers/input/serio/i8042.h, so
+ * using the _LINUX prefix here as this is the <linux/i8042.h> file.
+ */
+#ifndef _LINUX_I8042_H
+#define _LINUX_I8402_H
+
+int i8042_command(unsigned char *param, int command);
+
+#endif
prev parent reply other threads:[~2007-07-17 18:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-17 10:18 [PATCH 1/3] leds-clevo-mail: export i8042_command() Németh Márton
2007-07-17 13:02 ` Dmitry Torokhov
2007-07-17 18:12 ` Németh Márton [this message]
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=469D0690.9020408@freemail.hu \
--to=nm127@freemail.hu \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=rodripe@gmail.com \
--cc=rpurdie@rpsys.net \
/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;
as well as URLs for NNTP newsgroup(s).