summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>2016-02-17 18:03:37 +0530
committerKalle Valo <kvalo@codeaurora.org>2016-03-07 14:20:30 +0200
commit8dd37c7cd442411f52b90e8b556d38324450de46 (patch)
tree0e1e43f97eaba1b5aaab896f8903847dfdeb9708 /drivers/net/wireless
parent240d61a9ddeb8a77f11369f67f6ef060354b909d (diff)
downloadop-kernel-dev-8dd37c7cd442411f52b90e8b556d38324450de46.zip
op-kernel-dev-8dd37c7cd442411f52b90e8b556d38324450de46.tar.gz
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: Amitoj Kaur Chawla <amitoj1606@gmail.com> Reviewed-by: Julian Calaby <julian.calaby@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/11h.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/11h.c b/drivers/net/wireless/marvell/mwifiex/11h.c
index 71a1b58..81c60d0 100644
--- a/drivers/net/wireless/marvell/mwifiex/11h.c
+++ b/drivers/net/wireless/marvell/mwifiex/11h.c
@@ -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)
{
struct cfg80211_chan_def chandef;
- struct delayed_work *delayed_work =
- container_of(work, struct delayed_work, work);
+ struct delayed_work *delayed_work = to_delayed_work(work);
struct mwifiex_private *priv =
container_of(delayed_work, struct mwifiex_private,
dfs_cac_work);
@@ -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)
{
struct mwifiex_uap_bss_param *bss_cfg;
- struct delayed_work *delayed_work =
- container_of(work, struct delayed_work, work);
+ struct delayed_work *delayed_work = to_delayed_work(work);
struct mwifiex_private *priv =
container_of(delayed_work, struct mwifiex_private,
dfs_chan_sw_work);
OpenPOWER on IntegriCloud