提交 a85a7e28 编写于 作者: G Geliang Tang 提交者: Johannes Berg

cfg80211/mac80211: use to_delayed_work

Use to_delayed_work() instead of open-coding it.
Signed-off-by: NGeliang Tang <geliangtang@163.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 4352a4d7
...@@ -1638,8 +1638,7 @@ void ieee80211_dynamic_ps_timer(unsigned long data) ...@@ -1638,8 +1638,7 @@ void ieee80211_dynamic_ps_timer(unsigned long data)
void ieee80211_dfs_cac_timer_work(struct work_struct *work) void ieee80211_dfs_cac_timer_work(struct work_struct *work)
{ {
struct delayed_work *delayed_work = struct delayed_work *delayed_work = to_delayed_work(work);
container_of(work, struct delayed_work, work);
struct ieee80211_sub_if_data *sdata = struct ieee80211_sub_if_data *sdata =
container_of(delayed_work, struct ieee80211_sub_if_data, container_of(delayed_work, struct ieee80211_sub_if_data,
dfs_cac_timer_work); dfs_cac_timer_work);
......
...@@ -711,7 +711,7 @@ EXPORT_SYMBOL(cfg80211_rx_mgmt); ...@@ -711,7 +711,7 @@ EXPORT_SYMBOL(cfg80211_rx_mgmt);
void cfg80211_dfs_channels_update_work(struct work_struct *work) void cfg80211_dfs_channels_update_work(struct work_struct *work)
{ {
struct delayed_work *delayed_work; struct delayed_work *delayed_work = to_delayed_work(work);
struct cfg80211_registered_device *rdev; struct cfg80211_registered_device *rdev;
struct cfg80211_chan_def chandef; struct cfg80211_chan_def chandef;
struct ieee80211_supported_band *sband; struct ieee80211_supported_band *sband;
...@@ -721,7 +721,6 @@ void cfg80211_dfs_channels_update_work(struct work_struct *work) ...@@ -721,7 +721,6 @@ void cfg80211_dfs_channels_update_work(struct work_struct *work)
unsigned long timeout, next_time = 0; unsigned long timeout, next_time = 0;
int bandid, i; int bandid, i;
delayed_work = container_of(work, struct delayed_work, work);
rdev = container_of(delayed_work, struct cfg80211_registered_device, rdev = container_of(delayed_work, struct cfg80211_registered_device,
dfs_update_channels_wk); dfs_update_channels_wk);
wiphy = &rdev->wiphy; wiphy = &rdev->wiphy;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册