kernel: b53: use devm_gpio_request_one() to request gpio
authorHauke Mehrtens <hauke@hauke-m.de>
Thu, 1 Aug 2013 20:46:56 +0000 (20:46 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 1 Aug 2013 20:46:56 +0000 (20:46 +0000)
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
SVN-Revision: 37648

target/linux/generic/files/drivers/net/phy/b53/b53_common.c

index 97968dbf0b0a2f9a907208d900d5a9bc73db1d95..467f9b28479e474eaf6edfbe37a906a21266d9d9 100644 (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;
        }