Search Linux Wireless

[PATCH 20/44] compat/2.6.32: fix compat inline to flush_delayed_work()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This was needed as major API changes was made in 2.6.21.

Signed-off-by: Arnaud Lacombe <lacombar@xxxxxxxxx>
---
 include/linux/compat-2.6.32.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/compat-2.6.32.h b/include/linux/compat-2.6.32.h
index 321a89a..873ae3d 100644
--- a/include/linux/compat-2.6.32.h
+++ b/include/linux/compat-2.6.32.h
@@ -20,6 +20,10 @@
 
 static inline void flush_delayed_work(struct delayed_work *dwork)
 {
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21))
+	cancel_delayed_work(dwork);
+	flush_scheduled_work();
+#else
 	if (del_timer_sync(&dwork->timer)) {
 		/*
 		 * This is what would happen on 2.6.32 but since we don't have
@@ -34,6 +38,7 @@ static inline void flush_delayed_work(struct delayed_work *dwork)
 		*/
 	}
 	flush_work(&dwork->work);
+#endif
 }
 
 /*
-- 
1.7.2.30.gc37d7.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux