lkml.org 
[lkml]   [2006]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH/RFC?] usb/input: Add support for fn key on Apple PowerBooks
On Mon, 2006-01-02 at 23:46 +0100, Michael Hanselmann wrote:

> +static int powerbook_fkeysfirst = 1;
> +module_param_named(pb_fkeysfirst, powerbook_fkeysfirst, bool, 0644);
> +MODULE_PARM_DESC(powerbook_fkeysfirst, "Use fn special keys only while pressing fn");
> +
> +static int powerbook_enablefnkeys = 1;
> +module_param_named(pb_enablefnkeys, powerbook_enablefnkeys, bool, 0644);
> +MODULE_PARM_DESC(powerbook_enablefnkeys, "Enable fn special keys");
> +
> +static int powerbook_enablekeypad = 1;
> +module_param_named(pb_enablekeypad, powerbook_enablekeypad, bool, 0644);
> +MODULE_PARM_DESC(powerbook_enablekeypad, "Enable keypad keys");
> +#endif

I think these should be inverted to, something like
pbook_disable_keypad, pbook_disable_fnkeys and pbook_fnfirst.

Two reasons. First, it just makes more sense to pass a module param to
turn something on (doing powerbook_enablekeypad=0 isn't as intuitive as
pbook_disable_keypad=1). Second reason is that since these are static
vars, defaulting them to uninitialized (leaving them in the bss, as 0)
reduces binary size.

--
Ben Collins <ben.collins@ubuntu.com>
Developer
Ubuntu Linux

-
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-01-03 03:36    [W:0.226 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site