All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] pwm: meson: Drop always false check from .request()
@ 2021-11-08 13:46 ` Uwe Kleine-König
  0 siblings, 0 replies; 18+ messages in thread
From: Uwe Kleine-König @ 2021-11-08 13:46 UTC (permalink / raw)
  To: Thierry Reding, Lee Jones
  Cc: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	linux-pwm, linux-amlogic, kernel

In .request() pwm_get_chip_data() returns NULL always since commit
e926b12c611c ("pwm: Clear chip_data in pwm_put()"). (And if it didn't
returning 0 would be wrong because then .request() wouldn't reenable
the clk which the other driver code depends on.)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-meson.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 3cf3bcf5ddfc..be3c806b57e4 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -120,16 +120,10 @@ static inline struct meson_pwm *to_meson_pwm(struct pwm_chip *chip)
 static int meson_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
 {
 	struct meson_pwm *meson = to_meson_pwm(chip);
-	struct meson_pwm_channel *channel;
+	struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm];
 	struct device *dev = chip->dev;
 	int err;
 
-	channel = pwm_get_chip_data(pwm);
-	if (channel)
-		return 0;
-
-	channel = &meson->channels[pwm->hwpwm];
-
 	if (channel->clk_parent) {
 		err = clk_set_parent(channel->clk, channel->clk_parent);
 		if (err < 0) {

base-commit: 6b75d88fa81b122cce37ebf17428a849ccd3d0f1
-- 
2.30.2


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

end of thread, other threads:[~2022-02-01  7:48 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08 13:46 [PATCH 1/4] pwm: meson: Drop always false check from .request() Uwe Kleine-König
2021-11-08 13:46 ` Uwe Kleine-König
2021-11-08 13:46 ` [PATCH 2/4] pwm: meson: Drop useless check for channel data being NULL Uwe Kleine-König
2021-11-08 13:46   ` Uwe Kleine-König
2021-11-20 23:34   ` Martin Blumenstingl
2021-11-20 23:34     ` Martin Blumenstingl
2021-11-08 13:46 ` [PATCH 3/4] pwm: meson: Simplify duplicated per-channel tracking Uwe Kleine-König
2021-11-08 13:46   ` Uwe Kleine-König
2021-11-20 23:35   ` Martin Blumenstingl
2021-11-20 23:35     ` Martin Blumenstingl
2021-11-08 13:46 ` [PATCH 4/4] pwm: meson: Drop always false check from .apply() Uwe Kleine-König
2021-11-08 13:46   ` Uwe Kleine-König
2021-11-20 23:35   ` Martin Blumenstingl
2021-11-20 23:35     ` Martin Blumenstingl
2021-11-20 23:34 ` [PATCH 1/4] pwm: meson: Drop always false check from .request() Martin Blumenstingl
2021-11-20 23:34   ` Martin Blumenstingl
2022-02-01  7:47 ` Thierry Reding
2022-02-01  7:47   ` Thierry Reding

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.