Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358764
b: refs/heads/master
c: 125eef9
h: refs/heads/master
v: v3
  • Loading branch information
Alexandre Courbot authored and Grant Likely committed Feb 9, 2013
1 parent 4d0945f commit aca1a5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 65493e3ac429623df021e0859d97691f4b42615a
refs/heads/master: 125eef96f6cfadddbac8f6b9fccc9848988e7c6e
17 changes: 7 additions & 10 deletions trunk/drivers/gpio/gpiolib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,20 +1195,17 @@ struct gpio_chip *gpiochip_find(void *data,
int (*match)(struct gpio_chip *chip,
void *data))
{
struct gpio_chip *chip = NULL;
struct gpio_chip *chip;
unsigned long flags;
int i;

spin_lock_irqsave(&gpio_lock, flags);
for (i = 0; i < ARCH_NR_GPIOS; i++) {
if (!gpio_desc[i].chip)
continue;

if (match(gpio_desc[i].chip, data)) {
chip = gpio_desc[i].chip;
list_for_each_entry(chip, &gpio_chips, list)
if (match(chip, data))
break;
}
}

/* No match? */
if (&chip->list == &gpio_chips)
chip = NULL;
spin_unlock_irqrestore(&gpio_lock, flags);

return chip;
Expand Down

0 comments on commit aca1a5a

Please sign in to comment.