Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761886AbcJROiv (ORCPT ); Tue, 18 Oct 2016 10:38:51 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:34754 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761849AbcJROil (ORCPT ); Tue, 18 Oct 2016 10:38:41 -0400 From: Wei Yongjun To: Greg Kroah-Hartman , Muraru Mihaela , Wolfram Sang , Georgiana Rodica Chelu , Sabitha George , Bhumika Goyal Cc: Wei Yongjun , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH -next] staging: ks7010: ks_wlan_net: Use setup_timer instead of init_timer and data fields Date: Tue, 18 Oct 2016 14:38:33 +0000 Message-Id: <1476801513-25775-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 964 Lines: 28 From: Wei Yongjun Use setup_timer function instead of initializing timer with the function and data fields Signed-off-by: Wei Yongjun --- drivers/staging/ks7010/ks_wlan_net.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c index 7b864c0..3c58f84 100644 --- a/drivers/staging/ks7010/ks_wlan_net.c +++ b/drivers/staging/ks7010/ks_wlan_net.c @@ -3460,9 +3460,8 @@ int ks_wlan_net_start(struct net_device *dev) /* phy information update timer */ atomic_set(&update_phyinfo, 0); - init_timer(&update_phyinfo_timer); - update_phyinfo_timer.function = ks_wlan_update_phyinfo_timeout; - update_phyinfo_timer.data = (unsigned long)priv; + setup_timer(&update_phyinfo_timer, ks_wlan_update_phyinfo_timeout, + (unsigned long)priv); /* dummy address set */ memcpy(priv->eth_addr, dummy_addr, ETH_ALEN);