kernel: b53: use devm_gpio_request_one() to request gpio

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37648 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Hauke Mehrtens 2013-08-01 20:46:56 +00:00
parent 24880dbaa0
commit 7b7322f1f2
1 changed files with 4 additions and 3 deletions

View File

@ -459,8 +459,9 @@ void b53_switch_reset_gpio(struct b53_device *dev)
if (gpio < 0)
return;
gpio_set_value(gpio, 0);
gpio_direction_output(gpio, 1);
/*
* Reset sequence: RESET low(50ms)->high(20ms)
*/
gpio_set_value(gpio, 0);
mdelay(50);
@ -1216,7 +1217,7 @@ int b53_switch_init(struct b53_device *dev)
dev->reset_gpio = b53_switch_get_reset_gpio(dev);
if (dev->reset_gpio >= 0) {
ret = devm_gpio_request(dev->dev, dev->reset_gpio, "robo_reset");
ret = devm_gpio_request_one(dev->dev, dev->reset_gpio, GPIOF_OUT_INIT_HIGH, "robo_reset");
if (ret)
return ret;
}