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

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

 



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-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux