Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193576
b: refs/heads/master
c: 27fe971
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Corbet committed May 7, 2010
1 parent 8991de6 commit 847f2db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 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: 2b78a963c800252a0016785813cc5140c006145c
refs/heads/master: 27fe971d08b43f649358745a55f3c48ac6f413f8
5 changes: 2 additions & 3 deletions trunk/drivers/video/via/via-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,24 +246,23 @@ static int viafb_gpio_remove(struct platform_device *platdev)
unsigned long flags;
int ret = 0, i;

spin_lock_irqsave(&gpio_config.vdev->reg_lock, flags);
/*
* Get unregistered.
*/
if (gpio_config.gpio_chip.ngpio > 0) {
ret = gpiochip_remove(&gpio_config.gpio_chip);
if (ret) { /* Somebody still using it? */
printk(KERN_ERR "Viafb: GPIO remove failed\n");
goto out;
return ret;
}
}
/*
* Disable the ports.
*/
spin_lock_irqsave(&gpio_config.vdev->reg_lock, flags);
for (i = 0; i < gpio_config.gpio_chip.ngpio; i += 2)
viafb_gpio_disable(gpio_config.active_gpios[i]);
gpio_config.gpio_chip.ngpio = 0;
out:
spin_unlock_irqrestore(&gpio_config.vdev->reg_lock, flags);
return ret;
}
Expand Down

0 comments on commit 847f2db

Please sign in to comment.