Re: [Uclinux-dist-devel] [PATCH] input/keyboard: new driver for ADP5520 MFD PMICs

From: Mike Frysinger
Date: Sun Sep 20 2009 - 18:41:16 EST


On Sun, Sep 20, 2009 at 02:30, Andrew Morton wrote:
> On Thu, 17 Sep 2009 14:24:10 -0400 Mike Frysinger wrote:
>> +struct adp5520_keys {
>> + Â Â struct input_dev *input;
>> + Â Â struct notifier_block notifier;
>> + Â Â struct device *master;
>> + Â Â unsigned short keycode[ADP5520_KEYMAPSIZE];
>
> Where is ADP5520_KEYMAPSIZE defined?

all these things are in the common mfd adp5520 patch. it introduces a
common adp5520 header.

>> + Â Â for (i = 0; i < ADP5520_MAXKEYS; i++)
>> + Â Â Â Â Â Â if (keymask & (1 << i))
>> + Â Â Â Â Â Â Â Â Â Â input_report_key(dev->input, dev->keycode[i], value);
>
> It seems odd that keycode is dimensioned with ADP5520_KEYMAPSIZE but
> here we iterate up to ADP5520_MAXKEYS.

ARRAY_SIZE() probably makes more sense
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/