From: feng wang Date: Tue, 21 Feb 2012 06:58:17 +0000 (+0800) Subject: usb/keyboard: remove leds set/unset for usb keyboard in driver/kernel X-Git-Tag: 2.1b_release~1333 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dfaf407696b414abc05752b5f5f405d00dccfe53;p=kernel%2Fkernel-mfld-blackbay.git usb/keyboard: remove leds set/unset for usb keyboard in driver/kernel BZ: 19068 In ICS, framework will handle the leds for usb keyboard and handle related function. In keyboard driver, leds are also set/unset but the implementation conflicts with that of the framework. The implementation of framework is same as google/samsung ICS phone. So remove leds set/unset functon in keyboard driver. Please note that the implementation of android is different from other linux base platform like ubuntu. Change-Id: I22b5289bdc26482b6881e421b742fec370aa3b2d Signed-off-by: feng wang Reviewed-on: http://android.intel.com:8080/36013 Reviewed-by: Zhuang, Jin Can Reviewed-by: Tang, Richard Reviewed-by: Meng, Zhe Tested-by: Meng, Zhe Reviewed-by: buildbot Tested-by: buildbot --- diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c index 3761ccf..7a8eb2b 100644 --- a/drivers/tty/vt/keyboard.c +++ b/drivers/tty/vt/keyboard.c @@ -1041,6 +1041,7 @@ static int kbd_update_leds_helper(struct input_handle *handle, void *data) * registered yet but we already getting updates form VT to * update led state. */ +#ifndef CONFIG_ANDROID static void kbd_bh(unsigned long dummy) { unsigned char leds = getleds(); @@ -1053,6 +1054,7 @@ static void kbd_bh(unsigned long dummy) } DECLARE_TASKLET_DISABLED(keyboard_tasklet, kbd_bh, 0); +#endif #if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) ||\ defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) ||\ @@ -1319,7 +1321,9 @@ static void kbd_event(struct input_handle *handle, unsigned int event_type, spin_unlock(&kbd_event_lock); +#ifndef CONFIG_ANDROID tasklet_schedule(&keyboard_tasklet); +#endif do_poke_blanked_console = 1; schedule_console_callback(); } @@ -1391,6 +1395,7 @@ static void kbd_disconnect(struct input_handle *handle) * Start keyboard handler on the new keyboard by refreshing LED state to * match the rest of the system. */ +#ifndef CONFIG_ANDROID static void kbd_start(struct input_handle *handle) { tasklet_disable(&keyboard_tasklet); @@ -1400,6 +1405,9 @@ static void kbd_start(struct input_handle *handle) tasklet_enable(&keyboard_tasklet); } +#else +static void kbd_start(struct input_handle *handle) {} +#endif static const struct input_device_id kbd_ids[] = { { @@ -1446,8 +1454,10 @@ int __init kbd_init(void) if (error) return error; +#ifndef CONFIG_ANDROID tasklet_enable(&keyboard_tasklet); tasklet_schedule(&keyboard_tasklet); +#endif return 0; } diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index ec2d17b..4019258 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h @@ -5,7 +5,9 @@ #include #include +#ifndef CONFIG_ANDROID extern struct tasklet_struct keyboard_tasklet; +#endif extern int shift_state; @@ -79,10 +81,14 @@ extern void (*kbd_ledfunc)(unsigned int led); extern int set_console(int nr); extern void schedule_console_callback(void); +#ifndef CONFIG_ANDROID static inline void set_leds(void) { tasklet_schedule(&keyboard_tasklet); } +#else +static inline void set_leds(void) {} +#endif static inline int vc_kbd_mode(struct kbd_struct * kbd, int flag) {