diff options
Diffstat (limited to 'drivers/nfc')
-rw-r--r-- | drivers/nfc/pn533/pn533.c | 5 | ||||
-rw-r--r-- | drivers/nfc/st-nci/ndlc.c | 9 | ||||
-rw-r--r-- | drivers/nfc/st-nci/se.c | 11 | ||||
-rw-r--r-- | drivers/nfc/st21nfca/se.c | 10 |
4 files changed, 12 insertions, 23 deletions
diff --git a/drivers/nfc/pn533/pn533.c b/drivers/nfc/pn533/pn533.c index c05cb637ba92..2effa5ff7082 100644 --- a/drivers/nfc/pn533/pn533.c +++ b/drivers/nfc/pn533/pn533.c @@ -2632,9 +2632,8 @@ struct pn533 *pn533_register_device(u32 device_type, if (priv->wq == NULL) goto error; - init_timer(&priv->listen_timer); - priv->listen_timer.data = (unsigned long) priv; - priv->listen_timer.function = pn533_listen_mode_timer; + setup_timer(&priv->listen_timer, pn533_listen_mode_timer, + (unsigned long)priv); skb_queue_head_init(&priv->resp_q); skb_queue_head_init(&priv->fragment_skb); diff --git a/drivers/nfc/st-nci/ndlc.c b/drivers/nfc/st-nci/ndlc.c index 9477994cf975..93a7536a9af9 100644 --- a/drivers/nfc/st-nci/ndlc.c +++ b/drivers/nfc/st-nci/ndlc.c @@ -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; + setup_timer(&ndlc->t1_timer, ndlc_t1_timeout, (unsigned long)ndlc); + setup_timer(&ndlc->t2_timer, ndlc_t2_timeout, (unsigned long)ndlc); skb_queue_head_init(&ndlc->rcv_q); skb_queue_head_init(&ndlc->send_q); diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c index 56f2112e0cd8..bd7c1e83169c 100644 --- a/drivers/nfc/st-nci/se.c +++ b/drivers/nfc/st-nci/se.c @@ -725,15 +725,12 @@ int st_nci_se_init(struct nci_dev *ndev, struct st_nci_se_status *se_status) init_completion(&info->se_info.req_completion); /* initialize timers */ - init_timer(&info->se_info.bwi_timer); - info->se_info.bwi_timer.data = (unsigned long)info; - info->se_info.bwi_timer.function = st_nci_se_wt_timeout; + setup_timer(&info->se_info.bwi_timer, st_nci_se_wt_timeout, + (unsigned long)info); info->se_info.bwi_active = false; - init_timer(&info->se_info.se_active_timer); - info->se_info.se_active_timer.data = (unsigned long)info; - info->se_info.se_active_timer.function = - st_nci_se_activation_timeout; + setup_timer(&info->se_info.se_active_timer, + st_nci_se_activation_timeout, (unsigned long)info); info->se_info.se_active = false; info->se_info.xch_error = false; diff --git a/drivers/nfc/st21nfca/se.c b/drivers/nfc/st21nfca/se.c index 3a98563d4a12..b2285455f77d 100644 --- a/drivers/nfc/st21nfca/se.c +++ b/drivers/nfc/st21nfca/se.c @@ -392,14 +392,12 @@ void st21nfca_se_init(struct nfc_hci_dev *hdev) init_completion(&info->se_info.req_completion); /* initialize timers */ - init_timer(&info->se_info.bwi_timer); - info->se_info.bwi_timer.data = (unsigned long)info; - info->se_info.bwi_timer.function = st21nfca_se_wt_timeout; + setup_timer(&info->se_info.bwi_timer, st21nfca_se_wt_timeout, + (unsigned long)info); info->se_info.bwi_active = false; - init_timer(&info->se_info.se_active_timer); - info->se_info.se_active_timer.data = (unsigned long)info; - info->se_info.se_active_timer.function = st21nfca_se_activation_timeout; + setup_timer(&info->se_info.se_active_timer, + st21nfca_se_activation_timeout, (unsigned long)info); info->se_info.se_active = false; info->se_info.count_pipes = 0; |