diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-11-23 16:29:05 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-11-23 16:29:05 +0100 |
commit | 866c9b94ef968445c52214b3748ecc52a8491bca (patch) | |
tree | 1fd073acb9be8e89e77b35c41e2964ac6feabee6 /drivers/tty/synclinkmp.c | |
parent | aea3706cfc4d952ed6d32b6d5845b5ecd99ed7f5 (diff) | |
parent | 841b86f3289dbe858daeceec36423d4ea286fac2 (diff) | |
download | linux-stable-866c9b94ef968445c52214b3748ecc52a8491bca.tar.gz linux-stable-866c9b94ef968445c52214b3748ecc52a8491bca.tar.bz2 linux-stable-866c9b94ef968445c52214b3748ecc52a8491bca.zip |
Merge tag 'for-linus-timers-conversion-final-v4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux into timers/urgent
Pull the last batch of manual timer conversions from Kees Cook:
- final batch of "non trivial" timer conversions (multi-tree dependencies,
things Coccinelle couldn't handle, etc).
- treewide conversions via Coccinelle, in 4 steps:
- DEFINE_TIMER() functions converted to struct timer_list * argument
- init_timer() -> setup_timer()
- setup_timer() -> timer_setup()
- setup_timer() -> timer_setup() (with a single embedded structure)
- deprecated timer API removals (init_timer(), setup_*timer())
- finalization of new API (remove global casts)
Diffstat (limited to 'drivers/tty/synclinkmp.c')
-rw-r--r-- | drivers/tty/synclinkmp.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c index 4fed9e7b281f..75f11ce1f0a1 100644 --- a/drivers/tty/synclinkmp.c +++ b/drivers/tty/synclinkmp.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-1.0+ /* * $Id: synclinkmp.c,v 4.38 2005/07/15 13:29:44 paulkf Exp $ * @@ -10,7 +11,6 @@ * Microgate and SyncLink are trademarks of Microgate Corporation * * Derived from serial.c written by Theodore Ts'o and Linus Torvalds - * This code is released under the GNU General Public License (GPL) * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -615,8 +615,8 @@ static void free_tmp_rx_buf(SLMP_INFO *info); static void load_pci_memory(SLMP_INFO *info, char* dest, const char* src, unsigned short count); static void trace_block(SLMP_INFO *info, const char* data, int count, int xmit); -static void tx_timeout(unsigned long context); -static void status_timeout(unsigned long context); +static void tx_timeout(struct timer_list *t); +static void status_timeout(struct timer_list *t); static unsigned char read_reg(SLMP_INFO *info, unsigned char addr); static void write_reg(SLMP_INFO *info, unsigned char addr, unsigned char val); @@ -3782,9 +3782,8 @@ static SLMP_INFO *alloc_dev(int adapter_num, int port_num, struct pci_dev *pdev) info->bus_type = MGSL_BUS_TYPE_PCI; info->irq_flags = IRQF_SHARED; - setup_timer(&info->tx_timer, tx_timeout, (unsigned long)info); - setup_timer(&info->status_timer, status_timeout, - (unsigned long)info); + timer_setup(&info->tx_timer, tx_timeout, 0); + timer_setup(&info->status_timer, status_timeout, 0); /* Store the PCI9050 misc control register value because a flaw * in the PCI9050 prevents LCR registers from being read if @@ -5468,9 +5467,9 @@ static void trace_block(SLMP_INFO *info,const char* data, int count, int xmit) /* called when HDLC frame times out * update stats and do tx completion processing */ -static void tx_timeout(unsigned long context) +static void tx_timeout(struct timer_list *t) { - SLMP_INFO *info = (SLMP_INFO*)context; + SLMP_INFO *info = from_timer(info, t, tx_timer); unsigned long flags; if ( debug_level >= DEBUG_LEVEL_INFO ) @@ -5495,10 +5494,10 @@ static void tx_timeout(unsigned long context) /* called to periodically check the DSR/RI modem signal input status */ -static void status_timeout(unsigned long context) +static void status_timeout(struct timer_list *t) { u16 status = 0; - SLMP_INFO *info = (SLMP_INFO*)context; + SLMP_INFO *info = from_timer(info, t, status_timer); unsigned long flags; unsigned char delta; |