diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-04-12 10:05:22 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-04-12 10:05:22 +0200 |
commit | ce0e2c60e69e5f87ab4ac10c935d8bd85d4d11f7 (patch) | |
tree | 34c50a492bb83543342fa316a2250d76d7a43835 /drivers | |
parent | 42c25013ca95ce79b4ed192188ca843ae48f8c71 (diff) | |
download | linux-stable-ce0e2c60e69e5f87ab4ac10c935d8bd85d4d11f7.tar.gz linux-stable-ce0e2c60e69e5f87ab4ac10c935d8bd85d4d11f7.tar.bz2 linux-stable-ce0e2c60e69e5f87ab4ac10c935d8bd85d4d11f7.zip |
Revert "gpio: rcar: Fine-grained Runtime PM support"
This reverts commit 65194cb174b873448b208eb6e04ecb72237af76e.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/gpio-rcar.c | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index cf41440aff91..4d9a315cfd43 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c @@ -242,32 +242,18 @@ static void gpio_rcar_config_general_input_output_mode(struct gpio_chip *chip, static int gpio_rcar_request(struct gpio_chip *chip, unsigned offset) { - struct gpio_rcar_priv *p = gpiochip_get_data(chip); - int error; - - error = pm_runtime_get_sync(&p->pdev->dev); - if (error < 0) - return error; - - error = pinctrl_request_gpio(chip->base + offset); - if (error) - pm_runtime_put(&p->pdev->dev); - - return error; + return pinctrl_request_gpio(chip->base + offset); } static void gpio_rcar_free(struct gpio_chip *chip, unsigned offset) { - struct gpio_rcar_priv *p = gpiochip_get_data(chip); - pinctrl_free_gpio(chip->base + offset); - /* Set the GPIO as an input to ensure that the next GPIO request won't + /* + * Set the GPIO as an input to ensure that the next GPIO request won't * drive the GPIO pin as an output. */ gpio_rcar_config_general_input_output_mode(chip, offset, false); - - pm_runtime_put(&p->pdev->dev); } static int gpio_rcar_direction_input(struct gpio_chip *chip, unsigned offset) @@ -414,6 +400,7 @@ static int gpio_rcar_probe(struct platform_device *pdev) } pm_runtime_enable(dev); + pm_runtime_get_sync(dev); io = platform_get_resource(pdev, IORESOURCE_MEM, 0); irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); @@ -480,6 +467,7 @@ static int gpio_rcar_probe(struct platform_device *pdev) err1: gpiochip_remove(gpio_chip); err0: + pm_runtime_put(dev); pm_runtime_disable(dev); return ret; } @@ -490,6 +478,7 @@ static int gpio_rcar_remove(struct platform_device *pdev) gpiochip_remove(&p->gpio_chip); + pm_runtime_put(&pdev->dev); pm_runtime_disable(&pdev->dev); return 0; } |