From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id EC8F51BFBC3 for ; Tue, 18 Apr 2017 00:36:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E767F25406 for ; Tue, 18 Apr 2017 00:36:09 +0000 (UTC) Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UA7b1tkyxhFJ for ; Tue, 18 Apr 2017 00:36:09 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by silver.osuosl.org (Postfix) with ESMTPS id CBFB43092D for ; Tue, 18 Apr 2017 00:36:08 +0000 (UTC) From: "Tobin C. Harding" Subject: [PATCH 05/15] staging: ks7010: rename wakeup work struct Date: Tue, 18 Apr 2017 10:35:33 +1000 Message-Id: <1492475743-25189-6-git-send-email-me@tobin.cc> In-Reply-To: <1492475743-25189-1-git-send-email-me@tobin.cc> References: <1492475743-25189-1-git-send-email-me@tobin.cc> List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: Greg Kroah-Hartman Cc: Wolfram Sang , driverdev-devel@linuxdriverproject.org struct work_struct uses identifier ks_wlan_wakeup_task, this is confusing because the 'task' suffix implies that this is a tasklet_struct instead of a work struct. Suffix 'work' would be more clear. The code would be easier to read if it followed the principle of least surprise and used the 'work' suffix for a work_struct identifier. Rename work_struct structure 'ks_wlan_wakeup_task' to 'wakeup_work'. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 14 +++++++------- drivers/staging/ks7010/ks_wlan.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index a04e4e3..2a54b4c 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -66,11 +66,13 @@ inline u32 get_DWORD(struct ks_wlan_private *priv) static void ks_wlan_hw_wakeup_task(struct work_struct *work) { - struct ks_wlan_private *priv = - container_of(work, struct ks_wlan_private, ks_wlan_wakeup_task); - int ps_status = atomic_read(&priv->psstatus.status); + struct ks_wlan_private *priv; + int ps_status; long time_left; + priv = container_of(work, struct ks_wlan_private, wakeup_work); + ps_status = atomic_read(&priv->psstatus.status); + if (ps_status == PS_SNOOZE) { ks_wlan_hw_wakeup_request(priv); time_left = wait_for_completion_interruptible_timeout( @@ -78,7 +80,7 @@ static void ks_wlan_hw_wakeup_task(struct work_struct *work) msecs_to_jiffies(20)); if (time_left <= 0) { DPRINTK(1, "wake up timeout or interrupted !!!\n"); - schedule_work(&priv->ks_wlan_wakeup_task); + schedule_work(&priv->wakeup_work); return; } } else { @@ -2656,10 +2658,8 @@ int hostif_init(struct ks_wlan_private *priv) atomic_set(&priv->psstatus.status, PS_NONE); atomic_set(&priv->psstatus.confirm_wait, 0); atomic_set(&priv->psstatus.snooze_guard, 0); - /* init_waitqueue_head(&priv->psstatus.wakeup_wait); */ init_completion(&priv->psstatus.wakeup_wait); - //INIT_WORK(&priv->ks_wlan_wakeup_task, ks_wlan_hw_wakeup_task, (void *)priv); - INIT_WORK(&priv->ks_wlan_wakeup_task, ks_wlan_hw_wakeup_task); + INIT_WORK(&priv->wakeup_work, ks_wlan_hw_wakeup_task); /* WPA */ memset(&priv->wpa, 0, sizeof(priv->wpa)); diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h index 7ba440a..7968470 100644 --- a/drivers/staging/ks7010/ks_wlan.h +++ b/drivers/staging/ks7010/ks_wlan.h @@ -429,7 +429,7 @@ struct ks_wlan_private { u8 *rxp; unsigned int rx_size; struct tasklet_struct sme_task; - struct work_struct ks_wlan_wakeup_task; + struct work_struct wakeup_work; int scan_ind_count; unsigned char eth_addr[ETH_ALEN]; -- 2.7.4 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel