diff options
Diffstat (limited to 'drivers/tty/serial/sccnxp.c')
-rw-r--r-- | drivers/tty/serial/sccnxp.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c index b9c7a904c1ea..d6ae3086c2a2 100644 --- a/drivers/tty/serial/sccnxp.c +++ b/drivers/tty/serial/sccnxp.c @@ -1,14 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * NXP (Philips) SCC+++(SCN+++) serial driver * * Copyright (C) 2012 Alexander Shiyan <shc_work@mail.ru> * * Based on sc26xx.c, by Thomas Bogendörfer (tsbogend@alpha.franken.de) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ #if defined(CONFIG_SERIAL_SCCNXP_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) @@ -465,9 +461,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 +983,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; |