pinctrl: lynxpoint: Move ->remove closer to ->probe()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 25 Oct 2019 17:53:58 +0000 (20:53 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 13 Dec 2019 14:48:48 +0000 (16:48 +0200)
Consolidate ->remove and ->probe() callbacks for better maintenance.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/pinctrl/intel/pinctrl-lynxpoint.c

index d403607..83b5b25 100644 (file)
@@ -416,6 +416,12 @@ static int lp_gpio_probe(struct platform_device *pdev)
        return 0;
 }
 
+static int lp_gpio_remove(struct platform_device *pdev)
+{
+       pm_runtime_disable(&pdev->dev);
+       return 0;
+}
+
 static int lp_gpio_runtime_suspend(struct device *dev)
 {
        return 0;
@@ -455,12 +461,6 @@ static const struct acpi_device_id lynxpoint_gpio_acpi_match[] = {
 };
 MODULE_DEVICE_TABLE(acpi, lynxpoint_gpio_acpi_match);
 
-static int lp_gpio_remove(struct platform_device *pdev)
-{
-       pm_runtime_disable(&pdev->dev);
-       return 0;
-}
-
 static struct platform_driver lp_gpio_driver = {
        .probe          = lp_gpio_probe,
        .remove         = lp_gpio_remove,