Re: [PATCH 07/11] restore amikbd compatibility with 2.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[email protected] 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux