Skip to content

Commit

Permalink
cfg80211/mac80211: use to_delayed_work
Browse files Browse the repository at this point in the history
Use to_delayed_work() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Geliang Tang authored and Johannes Berg committed Jan 14, 2016
1 parent 4352a4d commit a85a7e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1638,8 +1638,7 @@ void ieee80211_dynamic_ps_timer(unsigned long data)

void ieee80211_dfs_cac_timer_work(struct work_struct *work)
{
struct delayed_work *delayed_work =
container_of(work, struct delayed_work, work);
struct delayed_work *delayed_work = to_delayed_work(work);
struct ieee80211_sub_if_data *sdata =
container_of(delayed_work, struct ieee80211_sub_if_data,
dfs_cac_timer_work);
Expand Down
3 changes: 1 addition & 2 deletions net/wireless/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ EXPORT_SYMBOL(cfg80211_rx_mgmt);

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_chan_def chandef;
struct ieee80211_supported_band *sband;
Expand All @@ -721,7 +721,6 @@ void cfg80211_dfs_channels_update_work(struct work_struct *work)
unsigned long timeout, next_time = 0;
int bandid, i;

delayed_work = container_of(work, struct delayed_work, work);
rdev = container_of(delayed_work, struct cfg80211_registered_device,
dfs_update_channels_wk);
wiphy = &rdev->wiphy;
Expand Down

0 comments on commit a85a7e2

Please sign in to comment.