summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-stmpe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-stmpe.c')
-rw-r--r--drivers/gpio/gpio-stmpe.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c
index 395ee51445ea..6c48809d0505 100644
--- a/drivers/gpio/gpio-stmpe.c
+++ b/drivers/gpio/gpio-stmpe.c
@@ -500,12 +500,6 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
if (ret)
goto out_free;
- ret = gpiochip_add_data(&stmpe_gpio->chip, stmpe_gpio);
- if (ret) {
- dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret);
- goto out_disable;
- }
-
if (irq > 0) {
struct gpio_irq_chip *girq;
@@ -528,6 +522,12 @@ static int stmpe_gpio_probe(struct platform_device *pdev)
girq->threaded = true;
}
+ ret = gpiochip_add_data(&stmpe_gpio->chip, stmpe_gpio);
+ if (ret) {
+ dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret);
+ goto out_disable;
+ }
+
platform_set_drvdata(pdev, stmpe_gpio);
return 0;