summaryrefslogtreecommitdiffstats
path: root/drivers/staging/nvec/nvec_kbd.c
diff options
context:
space:
mode:
authorMarc Dietrich <marvin24@gmx.de>2011-09-27 19:00:40 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-29 17:40:37 -0700
commit162c7d8c4be2d599583c42c2a8fe99bed6d87f67 (patch)
tree3ce4ae5fb7269e378e9f26d15433c41209b5fd0e /drivers/staging/nvec/nvec_kbd.c
parent7974035c008d98ec23ec76d9f10bff2dfd866ecf (diff)
downloadop-kernel-dev-162c7d8c4be2d599583c42c2a8fe99bed6d87f67.zip
op-kernel-dev-162c7d8c4be2d599583c42c2a8fe99bed6d87f67.tar.gz
staging: nvec: coding style fixes / add copyright notice
This patch fixes coding style and adds copyright notices. Signed-off-by: Marc Dietrich <marvin24@gmx.de> [jak@jak-linux.org: Merge later cleanup into that patch] Signed-off-by: Julian Andres Klode <jak@jak-linux.org> Acked-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/nvec/nvec_kbd.c')
-rw-r--r--drivers/staging/nvec/nvec_kbd.c36
1 files changed, 28 insertions, 8 deletions
diff --git a/drivers/staging/nvec/nvec_kbd.c b/drivers/staging/nvec/nvec_kbd.c
index 87f0378..06e877c 100644
--- a/drivers/staging/nvec/nvec_kbd.c
+++ b/drivers/staging/nvec/nvec_kbd.c
@@ -1,15 +1,30 @@
+/*
+ * nvec_kbd: keyboard driver for a NVIDIA compliant embedded controller
+ *
+ * Copyright (C) 2011 The AC100 Kernel Team <ac100@lists.launchpad.net>
+ *
+ * Authors: Pierre-Hugues Husson <phhusson@free.fr>
+ * Marc Dietrich <marvin24@gmx.de>
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ */
+
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
+
#include "nvec-keytable.h"
#include "nvec.h"
#define ACK_KBD_EVENT {'\x05', '\xed', '\x01'}
static unsigned char keycodes[ARRAY_SIZE(code_tab_102us)
- + ARRAY_SIZE(extcode_tab_us102)];
+ + ARRAY_SIZE(extcode_tab_us102)];
struct nvec_keys {
struct input_dev *input;
@@ -20,7 +35,7 @@ struct nvec_keys {
static struct nvec_keys keys_dev;
static int nvec_keys_notifier(struct notifier_block *nb,
- unsigned long event_type, void *data)
+ unsigned long event_type, void *data)
{
int code, state;
unsigned char *msg = (unsigned char *)data;
@@ -38,7 +53,8 @@ static int nvec_keys_notifier(struct notifier_block *nb,
code = msg[1] & 0x7f;
state = msg[1] & 0x80;
- input_report_key(keys_dev.input, code_tabs[_size][code], !state);
+ input_report_key(keys_dev.input, code_tabs[_size][code],
+ !state);
input_sync(keys_dev.input);
return NOTIFY_STOP;
@@ -48,7 +64,7 @@ static int nvec_keys_notifier(struct notifier_block *nb,
}
static int nvec_kbd_event(struct input_dev *dev, unsigned int type,
- unsigned int code, int value)
+ unsigned int code, int value)
{
unsigned char buf[] = ACK_KBD_EVENT;
struct nvec_chip *nvec = keys_dev.nvec;
@@ -125,10 +141,10 @@ fail:
}
static struct platform_driver nvec_kbd_driver = {
- .probe = nvec_kbd_probe,
- .driver = {
- .name = "nvec-kbd",
- .owner = THIS_MODULE,
+ .probe = nvec_kbd_probe,
+ .driver = {
+ .name = "nvec-kbd",
+ .owner = THIS_MODULE,
},
};
@@ -138,3 +154,7 @@ static int __init nvec_kbd_init(void)
}
module_init(nvec_kbd_init);
+
+MODULE_AUTHOR("Marc Dietrich <marvin24@gmx.de>");
+MODULE_DESCRIPTION("NVEC keyboard driver");
+MODULE_LICENSE("GPL");
OpenPOWER on IntegriCloud