Bluetooth: bluecard: use setup_timer
authorGeliang Tang <geliangtang@gmail.com>
Sat, 11 Mar 2017 00:46:58 +0000 (08:46 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 12 Apr 2017 20:02:37 +0000 (22:02 +0200)
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/bluecard_cs.c

index c0b3b55769921da4d8bd9c52c12924cfa06908cc..007c0a45f31baa18b9da1b3a51e9b63536e1eba5 100644 (file)
@@ -695,9 +695,8 @@ static int bluecard_open(struct bluecard_info *info)
 
        spin_lock_init(&(info->lock));
 
-       init_timer(&(info->timer));
-       info->timer.function = &bluecard_activity_led_timeout;
-       info->timer.data = (u_long)info;
+       setup_timer(&(info->timer), &bluecard_activity_led_timeout,
+                   (u_long)info);
 
        skb_queue_head_init(&(info->txq));