diff options
author | Michael Trimarchi <michael@panicking.kicks-ass.org> | 2009-04-21 11:23:42 -0500 |
---|---|---|
committer | Nelson Castillo <arhuaco@freaks-unidos.net> | 2009-04-21 11:23:42 -0500 |
commit | 0b9d21bf5d05d5dd909425a67a8be2eb1c1fc579 (patch) | |
tree | a452504f40131b535ef4bda1400e780f29bf4cfd /drivers | |
parent | 7a806d20b7709a2894a7e29896621964f0021c92 (diff) |
This patch take the min platform data array size and keys array size.
Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/keyboard/neo1973kbd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/input/keyboard/neo1973kbd.c b/drivers/input/keyboard/neo1973kbd.c index 56d3a689a4a..a95dd5806d2 100644 --- a/drivers/input/keyboard/neo1973kbd.c +++ b/drivers/input/keyboard/neo1973kbd.c @@ -368,8 +368,7 @@ static int neo1973kbd_probe(struct platform_device *pdev) goto out_device_create_file; /* register GPIO IRQs */ - - for(n = 0; n < ARRAY_SIZE(keys); n++) { + for(n = 0; n < min(pdev->num_resources, ARRAY_SIZE(keys)); n++) { if (!pdev->resource[0].start) continue; |