Messages in this thread | | | Date | Fri, 06 Mar 2009 23:13:07 +0100 | From | Jiri Slaby <> | Subject | Re: [PATCH] hid/apple: add module parameter to swap the Command and Option keys |
| |
On 6.3.2009 06:33, Paul Collins wrote: > --- a/drivers/hid/hid-apple.c > +++ b/drivers/hid/hid-apple.c > @@ -40,6 +40,11 @@ module_param(fnmode, uint, 0644); > MODULE_PARM_DESC(fnmode, "Mode of fn key on Apple keyboards (0 = disabled, " > "[1] = fkeyslast, 2 = fkeysfirst)"); > > +static unsigned int swapmodifiers = 0;
Nowadays compilers optimize this away already, but no need to initialize .bss stuff to zero anyway.
> +module_param(swapmodifiers, uint, 0644); > +MODULE_PARM_DESC(fnmode, "Modifiers match labels or positions "
Weird first parameter => swapmodifiers.
Maybe this should rather be a bool instead of uint.
> + "([0] = labels, 1 = positions)"); > + > struct apple_sc { > unsigned long quirks; > unsigned int fn_on; > @@ -123,6 +128,14 @@ static struct apple_key_translation apple_iso_keyboard[] = { > { } > }; > > +static struct apple_key_translation apple_swap_modifiers[] = {
This might go into .rodata, right? => const
Anyway this is not feasible to do in this patch. Would you like to post a followup patch which will also modify the functions which use the translation tables?
| |