瀏覽代碼

Bluetooth: hci_h5: Use setup_timer Kernel API instead of init_timer

Replace init_timer function with setup_timer reported by coccinelle

Signed-off-by: Prasanna Karthik <pkarthik@intrinsyc.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Prasanna Karthik 8 年之前
父節點
當前提交
a1e0d04396
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      drivers/bluetooth/hci_h5.c

+ 1 - 3
drivers/bluetooth/hci_h5.c

@@ -204,9 +204,7 @@ static int h5_open(struct hci_uart *hu)
 
 	h5_reset_rx(h5);
 
-	init_timer(&h5->timer);
-	h5->timer.function = h5_timed_event;
-	h5->timer.data = (unsigned long)hu;
+	setup_timer(&h5->timer, h5_timed_event, (unsigned long)hu);
 
 	h5->tx_win = H5_TX_WIN_MAX;