lkml.org 
[lkml]   [2004]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 8/44] Don't reinitialize scancode map after sleep in atkbd.c
    Date
    From
    You can pull this changeset from:
    bk://kernel.bkbits.net/vojtech/input

    ===================================================================

    ChangeSet@1.1474.188.8, 2004-01-26 13:29:36+01:00, vojtech@suse.cz
    input: Bail out in atkbd.c if scancode set is changed, don't
    reinitialize scancode map. This is even more anoying than
    a new keyboard device in the unlikely case of set change.


    atkbd.c | 38 ++++++--------------------------------
    1 files changed, 6 insertions(+), 32 deletions(-)

    ===================================================================

    diff -Nru a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
    --- a/drivers/input/keyboard/atkbd.c Tue Mar 16 13:19:50 2004
    +++ b/drivers/input/keyboard/atkbd.c Tue Mar 16 13:19:50 2004
    @@ -741,45 +741,19 @@
    {
    struct atkbd *atkbd = serio->private;
    struct serio_dev *dev = serio->dev;
    - int i;

    - if (!dev) {
    - printk(KERN_DEBUG "atkbd: reconnect request, but serio is disconnected, ignoring...\n");
    - return -1;
    - }
    + if (!dev) {
    + printk(KERN_DEBUG "atkbd: reconnect request, but serio is disconnected, ignoring...\n");
    + return -1;
    + }

    if (atkbd->write) {
    if (atkbd_probe(atkbd))
    return -1;
    -
    - atkbd->set = atkbd_set_3(atkbd);
    + if (atkbd->set != atkbd_set_3(atkbd))
    + return -1;
    atkbd_enable(atkbd);
    - } else {
    - atkbd->set = 2;
    - atkbd->id = 0xab00;
    }
    -
    - /*
    - * Here we probably should check if the keyboard has the same set that
    - * it had before and bail out if it's different. But this will most likely
    - * cause new keyboard device be created... and for the user it will look
    - * like keyboard is lost
    - */
    -
    - if (atkbd->translated) {
    - for (i = 0; i < 128; i++) {
    - atkbd->keycode[i] = atkbd_set2_keycode[atkbd_unxlate_table[i]];
    - atkbd->keycode[i | 0x80] = atkbd_set2_keycode[atkbd_unxlate_table[i] | 0x80];
    - }
    - } else if (atkbd->set == 2) {
    - memcpy(atkbd->keycode, atkbd_set2_keycode, sizeof(atkbd->keycode));
    - } else {
    - memcpy(atkbd->keycode, atkbd_set3_keycode, sizeof(atkbd->keycode));
    - }
    -
    - for (i = 0; i < 512; i++)
    - if (atkbd->keycode[i] && atkbd->keycode[i] < 255)
    - set_bit(atkbd->keycode[i], atkbd->dev.keybit);

    return 0;
    }
    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 14:01    [W:0.021 / U:152.588 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site