From deaba3d687b7cb1a2868bd514fd665ee5efcaaf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Mon, 4 Dec 2023 23:05:22 +0100 Subject: [PATCH] w1: gpio: Drop unused enable_external_pullup from driver data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Link: https://lore.kernel.org/r/7009fc53745c8e0336e9379022ce648a60c519f8.1701727212.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski --- 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,