public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers: pwm: remove redundant check in pwm_ops_check()
@ 2026-01-29  6:43 Ben Zong-You Xie via B4 Relay
  2026-01-29  7:19 ` Uwe Kleine-König
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Zong-You Xie via B4 Relay @ 2026-01-29  6:43 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Uwe Kleine-König, linux-pwm, linux-kernel, Ben Zong-You Xie

From: Ben Zong-You Xie <ben717@andestech.com>

Drop the redundant check for the existence of 'ops->write_waveform'.

Fixes: 17e40c25158f ("pwm: New abstraction for PWM waveforms")
Signed-off-by: Ben Zong-You Xie <ben717@andestech.com>
---
 drivers/pwm/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index ec8731515333..450aedd32c81 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -1699,8 +1699,7 @@ static bool pwm_ops_check(const struct pwm_chip *chip)
 
 	if (ops->write_waveform) {
 		if (!ops->round_waveform_tohw ||
-		    !ops->round_waveform_fromhw ||
-		    !ops->write_waveform)
+		    !ops->round_waveform_fromhw)
 			return false;
 
 		if (PWM_WFHWSIZE < ops->sizeof_wfhw) {

---
base-commit: 63faf32666e03a78cc985bcbae196418cf7d7938
change-id: 20260129-fix-pwm-ops-check-6e36ce09d75a

Best regards,
--  
Ben Zong-You Xie <ben717@andestech.com>



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

end of thread, other threads:[~2026-01-30 10:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-29  6:43 [PATCH] drivers: pwm: remove redundant check in pwm_ops_check() Ben Zong-You Xie via B4 Relay
2026-01-29  7:19 ` Uwe Kleine-König
2026-01-30  5:11   ` Ben Zong-You Xie
2026-01-30 10:12     ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox