]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/nfc/st-nci/ndlc.c
treewide: setup_timer() -> timer_setup()
[mirror_ubuntu-bionic-kernel.git] / drivers / nfc / st-nci / ndlc.c
index 9477994cf97534fe38b6b1e70b603c932081de6e..f26d938d240f03dbb27889fc101d552511ea9d92 100644 (file)
@@ -246,18 +246,18 @@ void ndlc_recv(struct llt_ndlc *ndlc, struct sk_buff *skb)
 }
 EXPORT_SYMBOL(ndlc_recv);
 
-static void ndlc_t1_timeout(unsigned long data)
+static void ndlc_t1_timeout(struct timer_list *t)
 {
-       struct llt_ndlc *ndlc = (struct llt_ndlc *)data;
+       struct llt_ndlc *ndlc = from_timer(ndlc, t, t1_timer);
 
        pr_debug("\n");
 
        schedule_work(&ndlc->sm_work);
 }
 
-static void ndlc_t2_timeout(unsigned long data)
+static void ndlc_t2_timeout(struct timer_list *t)
 {
-       struct llt_ndlc *ndlc = (struct llt_ndlc *)data;
+       struct llt_ndlc *ndlc = from_timer(ndlc, t, t2_timer);
 
        pr_debug("\n");
 
@@ -282,13 +282,8 @@ int ndlc_probe(void *phy_id, struct nfc_phy_ops *phy_ops, struct device *dev,
        *ndlc_id = ndlc;
 
        /* initialize timers */
-       init_timer(&ndlc->t1_timer);
-       ndlc->t1_timer.data = (unsigned long)ndlc;
-       ndlc->t1_timer.function = ndlc_t1_timeout;
-
-       init_timer(&ndlc->t2_timer);
-       ndlc->t2_timer.data = (unsigned long)ndlc;
-       ndlc->t2_timer.function = ndlc_t2_timeout;
+       timer_setup(&ndlc->t1_timer, ndlc_t1_timeout, 0);
+       timer_setup(&ndlc->t2_timer, ndlc_t2_timeout, 0);
 
        skb_queue_head_init(&ndlc->rcv_q);
        skb_queue_head_init(&ndlc->send_q);