Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933883AbdCKArl (ORCPT ); Fri, 10 Mar 2017 19:47:41 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34507 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933696AbdCKAr2 (ORCPT ); Fri, 10 Mar 2017 19:47:28 -0500 From: Geliang Tang To: Marcel Holtmann , Gustavo Padovan , Johan Hedberg Cc: Geliang Tang , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Bluetooth: bluecard: use setup_timer Date: Sat, 11 Mar 2017 08:46:58 +0800 Message-Id: X-Mailer: git-send-email 2.9.3 In-Reply-To: <3afa5498142ef68256023257dad37b9f8352e65e.1489060803.git.geliangtang@gmail.com> References: <3afa5498142ef68256023257dad37b9f8352e65e.1489060803.git.geliangtang@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 766 Lines: 25 Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang --- drivers/bluetooth/bluecard_cs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index c0b3b55..007c0a4 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c @@ -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)); -- 2.9.3