Skip to contentSkip to conversation

bus: ts-nbus: Use pwm_apply_might_sleep()

PATCH In review Sean Young 3 participants 4 messages Jun 14, 2024 PWM

lore
Share & tools
lore

Sean Young

author
#0 lore raw

PATCH 1/1 bus: ts-nbus: Use pwm_apply_might_sleep()

pwm_apply_state() is deprecated since commit c748a6d77c06a ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()").

---
 drivers/bus/ts-nbus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/ts-nbus.c +1 -1
index baf22a82c47a7..b8af44c5cdbd0 100644
@@ -294,7 +294,7 @@ static int ts_nbus_probe(struct platform_device *pdev)
 	state.duty_cycle = state.period;
 	state.enabled = true;
 
-	ret = pwm_apply_state(pwm, &state);
+	ret = pwm_apply_might_sleep(pwm, &state);
 	if (ret < 0)
 		return dev_err_probe(dev, ret, "failed to configure PWM\n");
 
Signature · 1 line
2.45.2
Acked-by on v1 1/1
#1 lore raw

Hello,

[To: += Arnd]

Quoted 13 lines · Sean Young

pwm_apply_state() is deprecated since commit c748a6d77c06a ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()").

---
 drivers/bus/ts-nbus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/ts-nbus.c +0 -0
index baf22a82c47a7..b8af44c5cdbd0 100644

drivers/bus/ts-nbus.c static int ts_nbus_probe(struct platform_device *pdev) · line 299

Quoted 7 lines
drivers/bus/ts-nbus.c +1 -1
@@ -294,7 +294,7 @@ static int ts_nbus_probe(struct platform_device *pdev)
 	state.duty_cycle = state.period;
 	state.enabled = true;
 
-	ret = pwm_apply_state(pwm, &state);
+	ret = pwm_apply_might_sleep(pwm, &state);
 	if (ret < 0)
 		return dev_err_probe(dev, ret, "failed to configure PWM\n");

Thanks. I guess the patch becoming 8129d25e32b7fd0f77bc664252321f3a16bb26b8 was created a while before pwm_apply_might_sleep() was a thing.

Arnd, you merged the last changes to that driver. Do you want to care for that one, too? If not I can apply it via my pwm tree.

Best regards
Uwe

#2 lore raw
Quoted 10 lines · Uwe Kleine-König

On Fri, Jun 14, 2024 at 10:08:29AM +0100, Sean Young wrote:

Thanks. I guess the patch becoming 8129d25e32b7fd0f77bc664252321f3a16bb26b8 was created a while before pwm_apply_might_sleep() was a thing.

Arnd, you merged the last changes to that driver. Do you want to care for that one, too? If not I can apply it via my pwm tree.

Whichever works best for you. I generally take drivers/bus and drivers/soc fixes through the soc tree, but if this is a PWM related change then having it in the pwm tree makes sense as well.

If you like me to pick it up through the soc tree, please forward the fix to [email protected].

Arnd

#3 lore raw

Hello Arnd,

Quoted 12 lines · Arnd Bergmann
Quoted 10 lines · Uwe Kleine-König

On Fri, Jun 14, 2024 at 10:08:29AM +0100, Sean Young wrote:

Thanks. I guess the patch becoming 8129d25e32b7fd0f77bc664252321f3a16bb26b8 was created a while before pwm_apply_might_sleep() was a thing.

Arnd, you merged the last changes to that driver. Do you want to care for that one, too? If not I can apply it via my pwm tree.

Quoted 7 lines

Whichever works best for you. I generally take drivers/bus and drivers/soc fixes through the soc tree, but if this is a PWM related change then having it in the pwm tree makes sense as well.

If you like me to pick it up through the soc tree, please forward the fix to [email protected].

OK, then I pick it up and consider it done. Thanks.

Best regards
Uwe