]> Git Repo - linux.git/blobdiff - drivers/gpio/gpio-lynxpoint.c
thp: fix MADV_DONTNEED vs. MADV_FREE race
[linux.git] / drivers / gpio / gpio-lynxpoint.c
index 13107772be4ffc4e1d12d471cf5df7a65a1ab639..fbd393b46ce03f5526b369de97f3efbc55dd2005 100644 (file)
@@ -370,7 +370,7 @@ static int lp_gpio_probe(struct platform_device *pdev)
        gc->can_sleep = false;
        gc->parent = dev;
 
-       ret = gpiochip_add_data(gc, lg);
+       ret = devm_gpiochip_add_data(dev, gc, lg);
        if (ret) {
                dev_err(dev, "failed adding lp-gpio chip\n");
                return ret;
@@ -383,7 +383,6 @@ static int lp_gpio_probe(struct platform_device *pdev)
                                           handle_simple_irq, IRQ_TYPE_NONE);
                if (ret) {
                        dev_err(dev, "failed to add irqchip\n");
-                       gpiochip_remove(gc);
                        return ret;
                }
 
@@ -439,9 +438,7 @@ MODULE_DEVICE_TABLE(acpi, lynxpoint_gpio_acpi_match);
 
 static int lp_gpio_remove(struct platform_device *pdev)
 {
-       struct lp_gpio *lg = platform_get_drvdata(pdev);
        pm_runtime_disable(&pdev->dev);
-       gpiochip_remove(&lg->chip);
        return 0;
 }
 
This page took 0.033341 seconds and 4 git commands to generate.