Commit 07e483c1 authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman

staging: ks7010: rename wakeup work struct

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: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b9ca8bb4
...@@ -66,11 +66,13 @@ inline u32 get_DWORD(struct ks_wlan_private *priv) ...@@ -66,11 +66,13 @@ inline u32 get_DWORD(struct ks_wlan_private *priv)
static void ks_wlan_hw_wakeup_task(struct work_struct *work) static void ks_wlan_hw_wakeup_task(struct work_struct *work)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv;
container_of(work, struct ks_wlan_private, ks_wlan_wakeup_task); int ps_status;
int ps_status = atomic_read(&priv->psstatus.status);
long time_left; 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) { if (ps_status == PS_SNOOZE) {
ks_wlan_hw_wakeup_request(priv); ks_wlan_hw_wakeup_request(priv);
time_left = wait_for_completion_interruptible_timeout( time_left = wait_for_completion_interruptible_timeout(
...@@ -78,7 +80,7 @@ static void ks_wlan_hw_wakeup_task(struct work_struct *work) ...@@ -78,7 +80,7 @@ static void ks_wlan_hw_wakeup_task(struct work_struct *work)
msecs_to_jiffies(20)); msecs_to_jiffies(20));
if (time_left <= 0) { if (time_left <= 0) {
DPRINTK(1, "wake up timeout or interrupted !!!\n"); DPRINTK(1, "wake up timeout or interrupted !!!\n");
schedule_work(&priv->ks_wlan_wakeup_task); schedule_work(&priv->wakeup_work);
return; return;
} }
} else { } else {
...@@ -2656,10 +2658,8 @@ int hostif_init(struct ks_wlan_private *priv) ...@@ -2656,10 +2658,8 @@ int hostif_init(struct ks_wlan_private *priv)
atomic_set(&priv->psstatus.status, PS_NONE); atomic_set(&priv->psstatus.status, PS_NONE);
atomic_set(&priv->psstatus.confirm_wait, 0); atomic_set(&priv->psstatus.confirm_wait, 0);
atomic_set(&priv->psstatus.snooze_guard, 0); atomic_set(&priv->psstatus.snooze_guard, 0);
/* init_waitqueue_head(&priv->psstatus.wakeup_wait); */
init_completion(&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->wakeup_work, ks_wlan_hw_wakeup_task);
INIT_WORK(&priv->ks_wlan_wakeup_task, ks_wlan_hw_wakeup_task);
/* WPA */ /* WPA */
memset(&priv->wpa, 0, sizeof(priv->wpa)); memset(&priv->wpa, 0, sizeof(priv->wpa));
......
...@@ -429,7 +429,7 @@ struct ks_wlan_private { ...@@ -429,7 +429,7 @@ struct ks_wlan_private {
u8 *rxp; u8 *rxp;
unsigned int rx_size; unsigned int rx_size;
struct tasklet_struct sme_task; struct tasklet_struct sme_task;
struct work_struct ks_wlan_wakeup_task; struct work_struct wakeup_work;
int scan_ind_count; int scan_ind_count;
unsigned char eth_addr[ETH_ALEN]; unsigned char eth_addr[ETH_ALEN];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment