mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
serial: sccnxp: 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: Jiri Slaby <[email protected]> Cc: [email protected] Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
1209a81369
commit
fc3b00d7dd
1 changed files with 3 additions and 4 deletions
|
|
@ -465,9 +465,9 @@ static void sccnxp_handle_events(struct sccnxp_port *s)
|
|||
} while (1);
|
||||
}
|
||||
|
||||
static void sccnxp_timer(unsigned long data)
|
||||
static void sccnxp_timer(struct timer_list *t)
|
||||
{
|
||||
struct sccnxp_port *s = (struct sccnxp_port *)data;
|
||||
struct sccnxp_port *s = from_timer(s, t, timer);
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&s->lock, flags);
|
||||
|
|
@ -987,8 +987,7 @@ static int sccnxp_probe(struct platform_device *pdev)
|
|||
|
||||
dev_err(&pdev->dev, "Unable to reguest IRQ %i\n", s->irq);
|
||||
} else {
|
||||
init_timer(&s->timer);
|
||||
setup_timer(&s->timer, sccnxp_timer, (unsigned long)s);
|
||||
timer_setup(&s->timer, sccnxp_timer, 0);
|
||||
mod_timer(&s->timer, jiffies +
|
||||
usecs_to_jiffies(s->pdata.poll_time_us));
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue