summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/ene_ir.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-24 17:23:14 +0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-10-31 11:31:44 +0100
commitb17ec78a42713a477151e9a78c07eb7dea0e10e9 (patch)
tree1ab2fafa4cf2b6b5985e7e7f7b635f69e7a1858d /drivers/media/rc/ene_ir.c
parentmedia: staging: atomisp: Add videobuf2 switch to TODO (diff)
downloadlinux-b17ec78a42713a477151e9a78c07eb7dea0e10e9.tar.xz
linux-b17ec78a42713a477151e9a78c07eb7dea0e10e9.zip
media: rc: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Maxim Levitsky <maximlevitsky@gmail.com> Cc: James Hogan <jhogan@kernel.org> Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: "Antti Seppälä" <a.seppala@gmail.com> Cc: Heiner Kallweit <hkallweit1@gmail.com> Cc: "David Härdeman" <david@hardeman.nu> Cc: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/ene_ir.c')
-rw-r--r--drivers/media/rc/ene_ir.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
index af7ba23e16e1..71b8c9bbf6c4 100644
--- a/drivers/media/rc/ene_ir.c
+++ b/drivers/media/rc/ene_ir.c
@@ -670,9 +670,9 @@ exit:
}
/* timer to simulate tx done interrupt */
-static void ene_tx_irqsim(unsigned long data)
+static void ene_tx_irqsim(struct timer_list *t)
{
- struct ene_device *dev = (struct ene_device *)data;
+ struct ene_device *dev = from_timer(dev, t, tx_sim_timer);
unsigned long flags;
spin_lock_irqsave(&dev->hw_lock, flags);
@@ -1045,8 +1045,7 @@ static int ene_probe(struct pnp_dev *pnp_dev, const struct pnp_device_id *id)
if (!dev->hw_learning_and_tx_capable && txsim) {
dev->hw_learning_and_tx_capable = true;
- setup_timer(&dev->tx_sim_timer, ene_tx_irqsim,
- (long unsigned int)dev);
+ timer_setup(&dev->tx_sim_timer, ene_tx_irqsim, 0);
pr_warn("Simulation of TX activated\n");
}