From 4d0945f0ed9dd34ab0792e4480366df4e8c173f5 Mon Sep 17 00:00:00 2001 From: Alexandre Courbot Date: Sun, 3 Feb 2013 01:29:25 +0900 Subject: [PATCH] --- yaml --- r: 358763 b: refs/heads/master c: 65493e3ac429623df021e0859d97691f4b42615a h: refs/heads/master i: 358761: 69491b1c8e8a36a177ee4ef7f88df5aa09b7f3fa 358759: e2b42c5498fc937562153183f96a3dc5055bc3b2 v: v3 --- [refs] | 2 +- trunk/drivers/gpio/gpiolib.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index b1a3599e2e0a..b2e1c7573662 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1a989d0f1de8f5a150b35e1e8181cc1abc139162 +refs/heads/master: 65493e3ac429623df021e0859d97691f4b42615a diff --git a/trunk/drivers/gpio/gpiolib.c b/trunk/drivers/gpio/gpiolib.c index 453ac77771ca..c1d8f7bdcd8f 100644 --- a/trunk/drivers/gpio/gpiolib.c +++ b/trunk/drivers/gpio/gpiolib.c @@ -974,7 +974,7 @@ static int __init gpiolib_sysfs_init(void) { int status; unsigned long flags; - unsigned gpio; + struct gpio_chip *chip; status = class_register(&gpio_class); if (status < 0) @@ -987,10 +987,7 @@ static int __init gpiolib_sysfs_init(void) * registered, and so arch_initcall() can always gpio_export(). */ spin_lock_irqsave(&gpio_lock, flags); - for (gpio = 0; gpio < ARCH_NR_GPIOS; gpio++) { - struct gpio_chip *chip; - - chip = gpio_desc[gpio].chip; + list_for_each_entry(chip, &gpio_chips, list) { if (!chip || chip->exported) continue;