From 0b9d21bf5d05d5dd909425a67a8be2eb1c1fc579 Mon Sep 17 00:00:00 2001 From: Michael Trimarchi Date: Tue, 21 Apr 2009 11:23:42 -0500 Subject: This patch take the min platform data array size and keys array size. Signed-off-by: Michael Trimarchi --- drivers/input/keyboard/neo1973kbd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') 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; -- cgit v1.2.3