[2.6 patch] drivers/char/keyboard.c: misc cleanups (fwd)

From: Adrian Bunk (bunk_at_stusta.de)
Date: 12/22/04

  • Next message: Adrian Bunk: "[2.6 patch] drivers/char/lp.c: make some code static (fwd)"
    Date:	Wed, 22 Dec 2004 12:50:08 +0100
    To: Andrew Morton <akpm@osdl.org>
    
    

    The patch forwarded below still applies and compiles against
    2.6.10-rc3-mm1.

    Please apply.

    ----- Forwarded message from Adrian Bunk <bunk@stusta.de> -----

    Date: Sun, 5 Dec 2004 18:00:15 +0100
    From: Adrian Bunk <bunk@stusta.de>
    To: vojtech@suse.cz
    Cc: linux-input@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org
    Subject: [2.6 patch] drivers/char/keyboard.c: misc cleanups

    The patch below contains the following changes:
    - make four needlessly global functions static
    - remove the unused global function register_leds

    diffstat output:
     drivers/char/keyboard.c | 20 ++++----------------
     1 files changed, 4 insertions(+), 16 deletions(-)

    Signed-off-by: Adrian Bunk <bunk@stusta.de>

    --- linux-2.6.10-rc1-mm3-full/drivers/char/keyboard.c.old 2004-11-07 00:20:09.000000000 +0100
    +++ linux-2.6.10-rc1-mm3-full/drivers/char/keyboard.c 2004-11-07 00:21:52.000000000 +0100
    @@ -330,7 +330,7 @@
      * in utf-8 already. UTF-8 is defined for words of up to 31 bits,
      * but we need only 16 bits here
      */
    -void to_utf8(struct vc_data *vc, ushort c)
    +static void to_utf8(struct vc_data *vc, ushort c)
     {
             if (c < 0x80)
                     /* 0******* */
    @@ -392,7 +392,7 @@
      * Otherwise, conclude that DIACR was not combining after all,
      * queue it and return CH.
      */
    -unsigned char handle_diacr(struct vc_data *vc, unsigned char ch)
    +static unsigned char handle_diacr(struct vc_data *vc, unsigned char ch)
     {
             int d = diacr;
             int i;
    @@ -853,18 +853,6 @@
             set_leds();
     }
     
    -void register_leds(struct kbd_struct *kbd, unsigned int led,
    - unsigned int *addr, unsigned int mask)
    -{
    - if (led < 3) {
    - ledptrs[led].addr = addr;
    - ledptrs[led].mask = mask;
    - ledptrs[led].valid = 1;
    - kbd->ledmode = LED_SHOW_MEM;
    - } else
    - kbd->ledmode = LED_SHOW_FLAGS;
    -}
    -
     static inline unsigned char getleds(void)
     {
             struct kbd_struct *kbd = kbd_table + fg_console;
    @@ -925,7 +913,7 @@
     /*
      * This allows a newly plugged keyboard to pick the LED state.
      */
    -void kbd_refresh_leds(struct input_handle *handle)
    +static void kbd_refresh_leds(struct input_handle *handle)
     {
             unsigned char leds = ledstate;
     
    @@ -1027,7 +1015,7 @@
     }
     #endif
     
    -void kbd_rawcode(unsigned char data)
    +static void kbd_rawcode(unsigned char data)
     {
             struct vc_data *vc = vc_cons[fg_console].d;
             kbd = kbd_table + fg_console;

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    ----- End forwarded message -----

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Adrian Bunk: "[2.6 patch] drivers/char/lp.c: make some code static (fwd)"

    Relevant Pages

    • Re: [PATCH 2.6.18 real-V5] drivers: add lcd display support
      ... Please prepare a separate patch for this, ... In numerous places the driver uses PRINTK_PREFIX for reporting errors. ... +static void cfag12864b_setbit(unsigned char state, ...
      (Linux-Kernel)
    • [2.6 patch] hpet: make some code static (fwd)
      ... The patch forwarded below still applies and compiles against ... +static void hpet_writel ... +static void __init wait_hpet_tick ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] sisfb update 2.6.1
      ... > Update for SiS framebuffer driver for 2.6.1 vanilla ... But we wouldn't want to have to defer this SiS patch ... unsigned char sr_data, cr_data, cr_data2, cr_data3; ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • [PATCH] add class_interface pointer to add and remove functions
      ... Here is a patch that updates every usage of class_interface I could find. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [2.4 patch] airo.c/airo_cs.c: correct prototypes
      ... A similar patch was already included in Linus' 2.6 tree. ... static void airo_config; ... static int airo_event(event_t event, int priority, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)