[PATCH 1/3] leds-clevo-mail: export i8042_command()

STALE6954d

3 messages, 2 authors, 2007-07-17 · open the first message on its own page

[PATCH 1/3] leds-clevo-mail: export i8042_command()

From: Németh Márton <hidden>
Date: 2007-07-17 10:18:43

From: Márton Németh <redacted>

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 <redacted>
---
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-16 20:53:38.000000000 +0200
@@ -208,7 +208,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 +219,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-16 21:00:54.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

Re: [PATCH 1/3] leds-clevo-mail: export i8042_command()

From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Date: 2007-07-17 13:02:30

On 7/17/07, Németh Márton [off-list ref] wrote:
From: Márton Németh <redacted>

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 <redacted>
Please #include <linux/i8042.h> into i8042.c. Doing so saves from
nasty surprises later.

-- 
Dmitry

Re: [PATCH 1/3] leds-clevo-mail: export i8042_command()

From: Németh Márton <hidden>
Date: 2007-07-17 18:12:53

From: Márton Németh <redacted>

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 <redacted>
---
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help