]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gpio: elkhartlake: reuse pm_ops from Intel Tangier driver
authorRaag Jadav <raag.jadav@intel.com>
Mon, 13 Nov 2023 13:15:59 +0000 (18:45 +0530)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 13 Nov 2023 15:59:48 +0000 (17:59 +0200)
Reuse tng_gpio_pm_ops from Intel Tangier driver instead of calling
them through a local copy.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Link: https://lore.kernel.org/r/20231113131600.10828-3-raag.jadav@intel.com
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/gpio/gpio-elkhartlake.c

index a9c8b16215be68a048a896ebc0c7892813c574ea..887c0fe99d3950df5e8d13fa7f1ef4cb3ce87811 100644 (file)
@@ -55,18 +55,6 @@ static int ehl_gpio_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int ehl_gpio_suspend(struct device *dev)
-{
-       return tng_gpio_suspend(dev);
-}
-
-static int ehl_gpio_resume(struct device *dev)
-{
-       return tng_gpio_resume(dev);
-}
-
-static DEFINE_SIMPLE_DEV_PM_OPS(ehl_gpio_pm_ops, ehl_gpio_suspend, ehl_gpio_resume);
-
 static const struct platform_device_id ehl_gpio_ids[] = {
        { "gpio-elkhartlake" },
        { }
@@ -76,7 +64,7 @@ MODULE_DEVICE_TABLE(platform, ehl_gpio_ids);
 static struct platform_driver ehl_gpio_driver = {
        .driver = {
                .name   = "gpio-elkhartlake",
-               .pm     = pm_sleep_ptr(&ehl_gpio_pm_ops),
+               .pm     = pm_sleep_ptr(&tng_gpio_pm_ops),
        },
        .probe          = ehl_gpio_probe,
        .id_table       = ehl_gpio_ids,