Commit 88d94e30 authored by Colin Brophy's avatar Colin Brophy Committed by Greg Kroah-Hartman

Staging: nvec: fixes coding style issues in nvec_kbd.c

This patches nvec_kbd.c to the file that fixes up errors found by
the checkpath.pl tool.
Signed-off-by: default avatarColin Brophy <colin@brophys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent fe39f945
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include "nvec-keytable.h" #include "nvec-keytable.h"
#include "nvec.h" #include "nvec.h"
#define ACK_KBD_EVENT {'\x05','\xed','\x01'} #define ACK_KBD_EVENT {'\x05', '\xed', '\x01'}
static unsigned char keycodes[ARRAY_SIZE(code_tab_102us) static unsigned char keycodes[ARRAY_SIZE(code_tab_102us)
+ ARRAY_SIZE(extcode_tab_us102)]; + ARRAY_SIZE(extcode_tab_us102)];
...@@ -27,10 +27,10 @@ static int nvec_keys_notifier(struct notifier_block *nb, ...@@ -27,10 +27,10 @@ static int nvec_keys_notifier(struct notifier_block *nb,
nvec_size _size = (msg[0] & (3 << 5)) >> 5; nvec_size _size = (msg[0] & (3 << 5)) >> 5;
/* power on/off button */ /* power on/off button */
if(_size == NVEC_VAR_SIZE) if (_size == NVEC_VAR_SIZE)
return NOTIFY_STOP; return NOTIFY_STOP;
if(_size == NVEC_3BYTES) if (_size == NVEC_3BYTES)
msg++; msg++;
code = msg[1] & 0x7f; code = msg[1] & 0x7f;
...@@ -51,13 +51,13 @@ static int nvec_kbd_event(struct input_dev *dev, unsigned int type, ...@@ -51,13 +51,13 @@ static int nvec_kbd_event(struct input_dev *dev, unsigned int type,
unsigned char buf[] = ACK_KBD_EVENT; unsigned char buf[] = ACK_KBD_EVENT;
struct nvec_chip *nvec = keys_dev.nvec; struct nvec_chip *nvec = keys_dev.nvec;
if(type==EV_REP) if (type == EV_REP)
return 0; return 0;
if(type!=EV_LED) if (type != EV_LED)
return -1; return -1;
if(code!=LED_CAPSL) if (code != LED_CAPSL)
return -1; return -1;
buf[2] = !!value; buf[2] = !!value;
...@@ -73,11 +73,11 @@ int __init nvec_kbd_init(struct nvec_chip *nvec) ...@@ -73,11 +73,11 @@ int __init nvec_kbd_init(struct nvec_chip *nvec)
j = 0; j = 0;
for(i = 0; i < ARRAY_SIZE(code_tab_102us); ++i) for (i = 0; i < ARRAY_SIZE(code_tab_102us); ++i)
keycodes[j++] = code_tab_102us[i]; keycodes[j++] = code_tab_102us[i];
for(i = 0; i < ARRAY_SIZE(extcode_tab_us102); ++i) for (i = 0; i < ARRAY_SIZE(extcode_tab_us102); ++i)
keycodes[j++]=extcode_tab_us102[i]; keycodes[j++] = extcode_tab_us102[i];
idev = input_allocate_device(); idev = input_allocate_device();
idev->name = "Tegra nvec keyboard"; idev->name = "Tegra nvec keyboard";
...@@ -89,12 +89,12 @@ int __init nvec_kbd_init(struct nvec_chip *nvec) ...@@ -89,12 +89,12 @@ int __init nvec_kbd_init(struct nvec_chip *nvec)
idev->keycodesize = sizeof(unsigned char); idev->keycodesize = sizeof(unsigned char);
idev->keycodemax = ARRAY_SIZE(keycodes); idev->keycodemax = ARRAY_SIZE(keycodes);
for( i = 0; i < ARRAY_SIZE(keycodes); ++i) for (i = 0; i < ARRAY_SIZE(keycodes); ++i)
set_bit(keycodes[i], idev->keybit); set_bit(keycodes[i], idev->keybit);
clear_bit(0, idev->keybit); clear_bit(0, idev->keybit);
err = input_register_device(idev); err = input_register_device(idev);
if(err) if (err)
goto fail; goto fail;
keys_dev.input = idev; keys_dev.input = idev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment