lkml.org 
[lkml]   [2006]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 07/11] restore amikbd compatibility with 2.4
    zippel@linux-m68k.org wrote:
    >
    > + for (i = 0; i < MAX_NR_KEYMAPS; i++) {
    > + static u_short temp_map[NR_KEYS] __initdata;
    > + if (!key_maps[i])
    > + continue;
    > + memset(temp_map, 0, sizeof(temp_map));
    > + for (j = 0; j < 0x78; j++) {
    > + if (!amikbd_keycode[j])
    > + continue;
    > + temp_map[j] = key_maps[i][amikbd_keycode[j]];
    > + }
    > + for (j = 0; j < NR_KEYS; j++) {
    > + if (!temp_map[j])
    > + temp_map[j] = 0xf200;
    > + }
    > + memcpy(key_maps[i], temp_map, sizeof(temp_map));
    > + }

    I assume temp_map[] is static to avoid using too much stack.

    But wouldn't it be simpler to make this code operate on key_maps[i] directly?


    -
    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: 2006-05-25 03:39    [W:0.022 / U:0.776 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site