Commit 8dd37c7c authored by Amitoj Kaur Chawla's avatar Amitoj Kaur Chawla Committed by Kalle Valo

mwifiex: Use to_delayed_work()

Introduce the use of to_delayed_work() helper function instead of open
coding it with container_of()

A simplified version of the Coccinelle semantic patch used to make
this change is:

//<smpl>
@@
expression a;
symbol work;
@@
- container_of(a, struct delayed_work, work)
+ to_delayed_work(a)
//</smpl>
Signed-off-by: default avatarAmitoj Kaur Chawla <amitoj1606@gmail.com>
Reviewed-by: default avatarJulian Calaby <julian.calaby@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 240d61a9
...@@ -123,8 +123,7 @@ void mwifiex_11h_process_join(struct mwifiex_private *priv, u8 **buffer, ...@@ -123,8 +123,7 @@ void mwifiex_11h_process_join(struct mwifiex_private *priv, u8 **buffer,
void mwifiex_dfs_cac_work_queue(struct work_struct *work) void mwifiex_dfs_cac_work_queue(struct work_struct *work)
{ {
struct cfg80211_chan_def chandef; struct cfg80211_chan_def chandef;
struct delayed_work *delayed_work = struct delayed_work *delayed_work = to_delayed_work(work);
container_of(work, struct delayed_work, work);
struct mwifiex_private *priv = struct mwifiex_private *priv =
container_of(delayed_work, struct mwifiex_private, container_of(delayed_work, struct mwifiex_private,
dfs_cac_work); dfs_cac_work);
...@@ -289,8 +288,7 @@ int mwifiex_11h_handle_radar_detected(struct mwifiex_private *priv, ...@@ -289,8 +288,7 @@ int mwifiex_11h_handle_radar_detected(struct mwifiex_private *priv,
void mwifiex_dfs_chan_sw_work_queue(struct work_struct *work) void mwifiex_dfs_chan_sw_work_queue(struct work_struct *work)
{ {
struct mwifiex_uap_bss_param *bss_cfg; struct mwifiex_uap_bss_param *bss_cfg;
struct delayed_work *delayed_work = struct delayed_work *delayed_work = to_delayed_work(work);
container_of(work, struct delayed_work, work);
struct mwifiex_private *priv = struct mwifiex_private *priv =
container_of(delayed_work, struct mwifiex_private, container_of(delayed_work, struct mwifiex_private,
dfs_chan_sw_work); dfs_chan_sw_work);
......
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