]> git.karo-electronics.de Git - linux-beck.git/commitdiff
wlcore: use to_delayed_work()
authorGeliang Tang <geliangtang@163.com>
Fri, 18 Mar 2016 02:21:28 +0000 (13:21 +1100)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 7 Apr 2016 16:37:35 +0000 (19:37 +0300)
Use to_delayed_work() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
[Update commit message]
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ti/wlcore/main.c
drivers/net/wireless/ti/wlcore/ps.c
drivers/net/wireless/ti/wlcore/scan.c

index dde36203ca426d04bb31fc963adb635981a10cf4..a872a07a484c90f897124cf3d6b67f8c71e01cbe 100644 (file)
@@ -243,7 +243,7 @@ static void wl12xx_tx_watchdog_work(struct work_struct *work)
        struct delayed_work *dwork;
        struct wl1271 *wl;
 
-       dwork = container_of(work, struct delayed_work, work);
+       dwork = to_delayed_work(work);
        wl = container_of(dwork, struct wl1271, tx_watchdog_work);
 
        mutex_lock(&wl->mutex);
@@ -2011,7 +2011,7 @@ static void wlcore_channel_switch_work(struct work_struct *work)
        struct wl12xx_vif *wlvif;
        int ret;
 
-       dwork = container_of(work, struct delayed_work, work);
+       dwork = to_delayed_work(work);
        wlvif = container_of(dwork, struct wl12xx_vif, channel_switch_work);
        wl = wlvif->wl;
 
@@ -2047,7 +2047,7 @@ static void wlcore_connection_loss_work(struct work_struct *work)
        struct ieee80211_vif *vif;
        struct wl12xx_vif *wlvif;
 
-       dwork = container_of(work, struct delayed_work, work);
+       dwork = to_delayed_work(work);
        wlvif = container_of(dwork, struct wl12xx_vif, connection_loss_work);
        wl = wlvif->wl;
 
@@ -2076,7 +2076,7 @@ static void wlcore_pending_auth_complete_work(struct work_struct *work)
        unsigned long time_spare;
        int ret;
 
-       dwork = container_of(work, struct delayed_work, work);
+       dwork = to_delayed_work(work);
        wlvif = container_of(dwork, struct wl12xx_vif,
                             pending_auth_complete_work);
        wl = wlvif->wl;
@@ -5588,7 +5588,7 @@ static void wlcore_roc_complete_work(struct work_struct *work)
        struct wl1271 *wl;
        int ret;
 
-       dwork = container_of(work, struct delayed_work, work);
+       dwork = to_delayed_work(work);
        wl = container_of(dwork, struct wl1271, roc_complete_work);
 
        ret = wlcore_roc_completed(wl);
index 4cd316e614665d4260370dfe945b9a629323f084..d4420da637d8d5d270256f712026d60868775a51 100644 (file)
@@ -38,7 +38,7 @@ void wl1271_elp_work(struct work_struct *work)
        struct wl12xx_vif *wlvif;
        int ret;
 
-       dwork = container_of(work, struct delayed_work, work);
+       dwork = to_delayed_work(work);
        wl = container_of(dwork, struct wl1271, elp_work);
 
        wl1271_debug(DEBUG_PSM, "elp work");
index 1e3d51cd673ab6d2be132c6fda17f698547b3ff7..a384f3f83099feb0335a640d91d8adf58bb78db1 100644 (file)
@@ -38,7 +38,7 @@ void wl1271_scan_complete_work(struct work_struct *work)
        struct wl12xx_vif *wlvif;
        int ret;
 
-       dwork = container_of(work, struct delayed_work, work);
+       dwork = to_delayed_work(work);
        wl = container_of(dwork, struct wl1271, scan_complete_work);
 
        wl1271_debug(DEBUG_SCAN, "Scanning complete");