[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7009fc53745c8e0336e9379022ce648a60c519f8.1701727212.git.u.kleine-koenig@pengutronix.de>
Date: Mon, 4 Dec 2023 23:05:22 +0100
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Rob Herring <robh@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, kernel@...gutronix.de
Subject: [PATCH v2 2/3] w1: gpio: Drop unused enable_external_pullup from driver data
This member is always NULL, so drop it. That makes the suspend and
resume callbacks empty, so they can be dropped, too.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
---
drivers/w1/masters/w1-gpio.c | 32 --------------------------------
1 file changed, 32 deletions(-)
diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c
index 8d65db65178c..67596428f69b 100644
--- a/drivers/w1/masters/w1-gpio.c
+++ b/drivers/w1/masters/w1-gpio.c
@@ -20,7 +20,6 @@
struct w1_gpio_ddata {
struct gpio_desc *gpiod;
struct gpio_desc *pullup_gpiod;
- void (*enable_external_pullup)(int enable);
unsigned int pullup_duration;
};
@@ -134,9 +133,6 @@ static int w1_gpio_probe(struct platform_device *pdev)
return err;
}
- if (pdata->enable_external_pullup)
- pdata->enable_external_pullup(1);
-
if (pdata->pullup_gpiod)
gpiod_set_value(pdata->pullup_gpiod, 1);
@@ -150,9 +146,6 @@ static int w1_gpio_remove(struct platform_device *pdev)
struct w1_bus_master *master = platform_get_drvdata(pdev);
struct w1_gpio_ddata *pdata = master->data;
- if (pdata->enable_external_pullup)
- pdata->enable_external_pullup(0);
-
if (pdata->pullup_gpiod)
gpiod_set_value(pdata->pullup_gpiod, 0);
@@ -161,34 +154,9 @@ static int w1_gpio_remove(struct platform_device *pdev)
return 0;
}
-static int __maybe_unused w1_gpio_suspend(struct device *dev)
-{
- struct w1_bus_master *master = dev_get_drvdata(dev);
- struct w1_gpio_ddata *pdata = master->data;
-
- if (pdata->enable_external_pullup)
- pdata->enable_external_pullup(0);
-
- return 0;
-}
-
-static int __maybe_unused w1_gpio_resume(struct device *dev)
-{
- struct w1_bus_master *master = dev_get_drvdata(dev);
- struct w1_gpio_ddata *pdata = master->data;
-
- if (pdata->enable_external_pullup)
- pdata->enable_external_pullup(1);
-
- return 0;
-}
-
-static SIMPLE_DEV_PM_OPS(w1_gpio_pm_ops, w1_gpio_suspend, w1_gpio_resume);
-
static struct platform_driver w1_gpio_driver = {
.driver = {
.name = "w1-gpio",
- .pm = &w1_gpio_pm_ops,
.of_match_table = of_match_ptr(w1_gpio_dt_ids),
},
.probe = w1_gpio_probe,
--
2.42.0
Powered by blists - more mailing lists