All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] hwmon: (pwm-fan) Replace OF specific call to PWM by plain one
@ 2022-08-26 17:26 Andy Shevchenko
  2022-08-26 17:26 ` [PATCH v2 2/3] pwm: core: Get rid of unused devm_of_pwm_get() Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andy Shevchenko @ 2022-08-26 17:26 UTC (permalink / raw)
  To: Andy Shevchenko, Uwe Kleine-König, linux-doc, linux-kernel,
	linux-pwm, linux-hwmon
  Cc: Jonathan Corbet, Thierry Reding, Bartlomiej Zolnierkiewicz,
	Jean Delvare, Guenter Roeck

There is no need to call OF specific devm_of_pwm_get() since
the device node parameter duplicates in the device parameter.
Hence we may safely replace it by plain devm_pwm_get() call.

This allows to drop devm_of_pwm_get() as no more users will be.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
v2: added tag (Uwe), left only one-liner change (Uwe, Guenter)
 drivers/hwmon/pwm-fan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c
index 6c08551d8d14..06fd1d75101d 100644
--- a/drivers/hwmon/pwm-fan.c
+++ b/drivers/hwmon/pwm-fan.c
@@ -302,7 +302,7 @@ static int pwm_fan_probe(struct platform_device *pdev)
 
 	mutex_init(&ctx->lock);
 
-	ctx->pwm = devm_of_pwm_get(dev, dev->of_node, NULL);
+	ctx->pwm = devm_pwm_get(dev, NULL);
 	if (IS_ERR(ctx->pwm))
 		return dev_err_probe(dev, PTR_ERR(ctx->pwm), "Could not get PWM\n");
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-29 13:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-26 17:26 [PATCH v2 1/3] hwmon: (pwm-fan) Replace OF specific call to PWM by plain one Andy Shevchenko
2022-08-26 17:26 ` [PATCH v2 2/3] pwm: core: Get rid of unused devm_of_pwm_get() Andy Shevchenko
2022-08-26 17:26 ` [PATCH v2 3/3] pwm: core: Make of_pwm_get() static Andy Shevchenko
2022-08-29 13:57 ` [PATCH v2 1/3] hwmon: (pwm-fan) Replace OF specific call to PWM by plain one Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.