diff options
| author | Mark Brown <broonie@kernel.org> | 2017-11-28 16:19:52 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2017-11-28 16:19:52 +0000 |
| commit | 69830d3909849dee33b9a2de88ece3d59c75a1b8 (patch) | |
| tree | 67e22ac989e782ddc104f186dee54d1675e76923 /drivers/tty/n_r3964.c | |
| parent | af1b1cefd735c919d3185ce06b549c2b121067ba (diff) | |
| parent | ef2e8175eb19011f756469d4d14f4207bf7f289c (diff) | |
Merge branch 'topic/disconnect' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar
Diffstat (limited to 'drivers/tty/n_r3964.c')
| -rw-r--r-- | drivers/tty/n_r3964.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/tty/n_r3964.c b/drivers/tty/n_r3964.c index 305b6490d405..30bb0900cd2f 100644 --- a/drivers/tty/n_r3964.c +++ b/drivers/tty/n_r3964.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-1.0+ /* r3964 linediscipline for linux * * ----------------------------------------------------------- @@ -5,9 +6,6 @@ * Philips Automation Projects * Kassel (Germany) * ----------------------------------------------------------- - * This software may be used and distributed according to the terms of - * the GNU General Public License, incorporated herein by reference. - * * Author: * L. Haag * @@ -117,7 +115,7 @@ static void retry_transmit(struct r3964_info *pInfo); static void transmit_block(struct r3964_info *pInfo); static void receive_char(struct r3964_info *pInfo, const unsigned char c); static void receive_error(struct r3964_info *pInfo, const char flag); -static void on_timeout(unsigned long priv); +static void on_timeout(struct timer_list *t); static int enable_signals(struct r3964_info *pInfo, struct pid *pid, int arg); static int read_telegram(struct r3964_info *pInfo, struct pid *pid, unsigned char __user * buf); @@ -690,9 +688,9 @@ static void receive_error(struct r3964_info *pInfo, const char flag) } } -static void on_timeout(unsigned long priv) +static void on_timeout(struct timer_list *t) { - struct r3964_info *pInfo = (void *)priv; + struct r3964_info *pInfo = from_timer(pInfo, t, tmr); switch (pInfo->state) { case R3964_TX_REQUEST: @@ -995,7 +993,7 @@ static int r3964_open(struct tty_struct *tty) tty->disc_data = pInfo; tty->receive_room = 65536; - setup_timer(&pInfo->tmr, on_timeout, (unsigned long)pInfo); + timer_setup(&pInfo->tmr, on_timeout, 0); return 0; } |
