summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/pwm-ir-tx.c
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2023-12-19 16:30:24 +0000
committerThierry Reding <thierry.reding@gmail.com>2023-12-20 16:07:04 +0100
commitc748a6d77c06a78651030e17da6beb278a1c9470 (patch)
treee858d2200f87189a80b0aeeeb68d96a449b63a11 /drivers/media/rc/pwm-ir-tx.c
parent80943bbdcfa8138eca3bfd71a8ed4bdf1e107f6b (diff)
downloadlinux-c748a6d77c06a78651030e17da6beb278a1c9470.tar.gz
linux-c748a6d77c06a78651030e17da6beb278a1c9470.tar.bz2
linux-c748a6d77c06a78651030e17da6beb278a1c9470.zip
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 <u.kleine-koenig@pengutronix.de> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> # for input Acked-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Lee Jones <lee@kernel.org> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
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;
}