summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--skey.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/skey.c b/skey.c
index 427f3e4..2ef5825 100644
--- a/skey.c
+++ b/skey.c
@@ -5,6 +5,7 @@
#include <linux/kthread.h>
#include <linux/delay.h>
#include <linux/sched.h>
+#include <linux/input.h>
#include "keymap.h"
/*
* defines whether to access the gpios so other parts of the kernel module can
@@ -26,12 +27,16 @@ static __initdata char * rlabels[3] = {"R0", "R1", "R2"};
* task struct for setting up the thread
*/
-static struct task_struct *update_task;
+__initdata static struct task_struct *update_task;
/*
* input.h input device
*/
-struct input_dev * skey_dev;
-
+__initdata struct input_dev * skey_dev;
+/*
+ * Name and ID
+ */
+__initdata struct input_id skey_id;
+__initdata char * skey_name = "Switch Keyboard for the Omnicom";
/*
*This function is called every timer-period to actually read the keyboard
*/
@@ -144,6 +149,14 @@ static int __init skey_init (void) {
set_bit(EV_KEY, skey_dev->evbit);
set_bit(EV_REL, skey_dev->evbit);
set_bit(KEY_CAPSLOCK, skey_dev->keybit);
+ //sets the name of skey_dev
+ skey_dev->name = skey_name;
+ //sets ids
+ skey_id.bustype = BUS_HOST;
+ skey_id.vendor = 13398;
+ skey_id.product = 13398;
+ skey_id.version = 1;
+ skey_dev->id = skey_id;
// registers the device
if (input_register_device(skey_dev)) {
input_free_device(skey_dev);