aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/rc/pwm-ir-tx.c
diff options
context:
space:
mode:
authorSean Young <[email protected]>2023-12-19 16:30:24 +0000
committerThierry Reding <[email protected]>2023-12-20 16:07:04 +0100
commitc748a6d77c06a78651030e17da6beb278a1c9470 (patch)
treee858d2200f87189a80b0aeeeb68d96a449b63a11 /drivers/media/rc/pwm-ir-tx.c
parent80943bbdcfa8138eca3bfd71a8ed4bdf1e107f6b (diff)
pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()
In order to introduce a pwm api which can be used from atomic context, we will need two functions for applying pwm changes: int pwm_apply_might_sleep(struct pwm *, struct pwm_state *); int pwm_apply_atomic(struct pwm *, struct pwm_state *); This commit just deals with renaming pwm_apply_state(), a following commit will introduce the pwm_apply_atomic() function. Acked-by: Uwe Kleine-König <[email protected]> Acked-by: Guenter Roeck <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> # for input Acked-by: Hans de Goede <[email protected]> Acked-by: Jani Nikula <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Sean Young <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
Diffstat (limited to 'drivers/media/rc/pwm-ir-tx.c')
-rw-r--r--drivers/media/rc/pwm-ir-tx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/rc/pwm-ir-tx.c b/drivers/media/rc/pwm-ir-tx.c
index c5f37c03af9c..cf51e2760975 100644
--- a/drivers/media/rc/pwm-ir-tx.c
+++ b/drivers/media/rc/pwm-ir-tx.c
@@ -68,7 +68,7 @@ static int pwm_ir_tx(struct rc_dev *dev, unsigned int *txbuf,
for (i = 0; i < count; i++) {
state.enabled = !(i % 2);
- pwm_apply_state(pwm, &state);
+ pwm_apply_might_sleep(pwm, &state);
edge = ktime_add_us(edge, txbuf[i]);
delta = ktime_us_delta(edge, ktime_get());
@@ -77,7 +77,7 @@ static int pwm_ir_tx(struct rc_dev *dev, unsigned int *txbuf,
}
state.enabled = false;
- pwm_apply_state(pwm, &state);
+ pwm_apply_might_sleep(pwm, &state);
return count;
}