projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07dba41
)
gpio: rk30: simplify rk30_gpiolib_request
author
黄涛
<huangtao@rock-chips.com>
Sat, 29 Dec 2012 06:37:44 +0000
(14:37 +0800)
committer
黄涛
<huangtao@rock-chips.com>
Sat, 29 Dec 2012 06:45:40 +0000
(14:45 +0800)
drivers/gpio/gpio-rk30.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/gpio-rk30.c
b/drivers/gpio/gpio-rk30.c
index 3bf56c5df84f3595b387beff442274dfd0f216bf..b11d3f3ff7ba08f3ebc1a507f75f0e506dc2b76b 100755
(executable)
--- a/
drivers/gpio/gpio-rk30.c
+++ b/
drivers/gpio/gpio-rk30.c
@@
-303,13
+303,10
@@
static int rk30_gpiolib_direction_input(struct gpio_chip *chip,unsigned offset)
spin_unlock_irqrestore(&bank->lock, flags);
return 0;
}
+
static int rk30_gpiolib_request(struct gpio_chip *chip, unsigned offset)
{
- struct rk30_gpio_bank *bank = to_rk30_gpio_bank(chip);
- int gpio = offset + PIN_BASE + bank->id * 32;
-
- iomux_set_gpio_mode(gpio);
-
+ iomux_set_gpio_mode(chip->base + offset);
return 0;
}