diff options
author | Geliang Tang <geliangtang@gmail.com> | 2017-03-23 21:15:57 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-24 12:33:42 -0700 |
commit | aff55a3638a2d13de5cf0b0c45993378282cbe91 (patch) | |
tree | f410bca6f54d51817634f5a8fa92304ac69a1b4e /drivers/isdn/hardware/mISDN/hfcpci.c | |
parent | 9096643856919eba4ea7dd462e3528bc6d230f4f (diff) |
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/hardware/mISDN/hfcpci.c')
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcpci.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index ff48da61c94c..5dc246d71c16 100644 --- a/drivers/isdn/hardware/mISDN/hfcpci.c +++ b/drivers/isdn/hardware/mISDN/hfcpci.c @@ -1717,9 +1717,8 @@ static void inithfcpci(struct hfc_pci *hc) { printk(KERN_DEBUG "inithfcpci: entered\n"); - hc->dch.timer.function = (void *) hfcpci_dbusy_timer; - hc->dch.timer.data = (long) &hc->dch; - init_timer(&hc->dch.timer); + setup_timer(&hc->dch.timer, (void *)hfcpci_dbusy_timer, + (long)&hc->dch); hc->chanlimit = 2; mode_hfcpci(&hc->bch[0], 1, -1); mode_hfcpci(&hc->bch[1], 2, -1); @@ -2044,9 +2043,7 @@ setup_hw(struct hfc_pci *hc) Write_hfc(hc, HFCPCI_INT_M1, hc->hw.int_m1); /* At this point the needed PCI config is done */ /* fifos are still not enabled */ - hc->hw.timer.function = (void *) hfcpci_Timer; - hc->hw.timer.data = (long) hc; - init_timer(&hc->hw.timer); + setup_timer(&hc->hw.timer, (void *)hfcpci_Timer, (long)hc); /* default PCM master */ test_and_set_bit(HFC_CFG_MASTER, &hc->cfg); return 0; |