
28 May
2013
28 May
'13
6:05 a.m.
On 05/26/2013 01:31 PM, Simon Glass wrote:
Hi Stephen,
On Thu, May 23, 2013 at 3:09 PM, Stephen Warren <swarren@wwwdotorg.org mailto:swarren@wwwdotorg.org> wrote:
From: Stephen Warren <swarren@nvidia.com <mailto:swarren@nvidia.com>> We know the exact property names that the code wants to process. Look these up directly with fdt_get_property(), rather than iterating over all properties within the node, and checking each property's name, in a convoluted fashion, against the expected name. + plain_keycode = create_keymap(config, (u32 *)prop->data, + proplen, KEY_FN, &config->fn_pos);
Probably don't need plain_keycode variable at all.
This is required because the variable is passed to free() later, and config->plain_keycode is marked const, whereas free isn't prototyped to take a const. I figured that it was simplest to use a separate variable here rather than cast away the const when calling free(). Now, if C had const_cast<>, then I would have made a different decision:-)