Thread (5 messages) 5 messages, 2 authors, 2024-01-24
STALE907d LANDED

[PATCH 4/5] pwm: clps711x: Drop custom .of_xlate() callback

From: Uwe Kleine-König <hidden>
Date: 2024-01-09 21:35:20
Also in: linux-pwm
Subsystem: pwm subsystem, the rest · Maintainers: Uwe Kleine-König, Linus Torvalds

The default of_xlate callback (of_pwm_xlate_with_flags()) does
everything the drivers expects from its .of_xlate() callback. So drop
the custom implementation.

Signed-off-by: Uwe Kleine-König <redacted>
---
 drivers/pwm/pwm-clps711x.c | 10 ----------
 1 file changed, 10 deletions(-)
diff --git a/drivers/pwm/pwm-clps711x.c b/drivers/pwm/pwm-clps711x.c
index 06562d4bb963..f3b4af7963be 100644
--- a/drivers/pwm/pwm-clps711x.c
+++ b/drivers/pwm/pwm-clps711x.c
@@ -74,15 +74,6 @@ static const struct pwm_ops clps711x_pwm_ops = {
 	.apply = clps711x_pwm_apply,
 };
 
-static struct pwm_device *clps711x_pwm_xlate(struct pwm_chip *chip,
-					     const struct of_phandle_args *args)
-{
-	if (args->args[0] >= chip->npwm)
-		return ERR_PTR(-EINVAL);
-
-	return pwm_request_from_chip(chip, args->args[0], NULL);
-}
-
 static int clps711x_pwm_probe(struct platform_device *pdev)
 {
 	struct clps711x_chip *priv;
@@ -102,7 +93,6 @@ static int clps711x_pwm_probe(struct platform_device *pdev)
 	priv->chip.ops = &clps711x_pwm_ops;
 	priv->chip.dev = &pdev->dev;
 	priv->chip.npwm = 2;
-	priv->chip.of_xlate = clps711x_pwm_xlate;
 
 	spin_lock_init(&priv->lock);
 
-- 
2.43.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help