diff options
author | Geliang Tang <geliangtang@gmail.com> | 2017-03-23 16:15:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-24 22:33:42 +0300 |
commit | aff55a3638a2d13de5cf0b0c45993378282cbe91 (patch) | |
tree | f410bca6f54d51817634f5a8fa92304ac69a1b4e /drivers/isdn/i4l | |
parent | 9096643856919eba4ea7dd462e3528bc6d230f4f (diff) | |
download | linux-aff55a3638a2d13de5cf0b0c45993378282cbe91.tar.xz |
isdn: use setup_timer
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/i4l')
-rw-r--r-- | drivers/isdn/i4l/isdn_ppp.c | 5 | ||||
-rw-r--r-- | drivers/isdn/i4l/isdn_tty.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index 9c1e8adaf4fc..d07dd5196ffc 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c @@ -2370,9 +2370,8 @@ static struct ippp_ccp_reset_state *isdn_ppp_ccp_reset_alloc_state(struct ippp_s rs->state = CCPResetIdle; rs->is = is; rs->id = id; - init_timer(&rs->timer); - rs->timer.data = (unsigned long)rs; - rs->timer.function = isdn_ppp_ccp_timer_callback; + setup_timer(&rs->timer, isdn_ppp_ccp_timer_callback, + (unsigned long)rs); is->reset->rs[id] = rs; } return rs; diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c index 1b169559a240..ddd8207e4e54 100644 --- a/drivers/isdn/i4l/isdn_tty.c +++ b/drivers/isdn/i4l/isdn_tty.c @@ -1812,9 +1812,8 @@ isdn_tty_modem_init(void) info->isdn_channel = -1; info->drv_index = -1; info->xmit_size = ISDN_SERIAL_XMIT_SIZE; - init_timer(&info->nc_timer); - info->nc_timer.function = isdn_tty_modem_do_ncarrier; - info->nc_timer.data = (unsigned long) info; + setup_timer(&info->nc_timer, isdn_tty_modem_do_ncarrier, + (unsigned long)info); skb_queue_head_init(&info->xmit_queue); #ifdef CONFIG_ISDN_AUDIO skb_queue_head_init(&info->dtmf_queue); |