From: Wolfgang Grandegger <[email protected]>

Signed-off-by: Wolfgang Grandegger <[email protected]>
---
 stack/rtmac/rtmac_disc.c |    4 ++++
 stack/rtnet_chrdev.c     |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/stack/rtmac/rtmac_disc.c b/stack/rtmac/rtmac_disc.c
index ca124a5..65a6f3f 100644
--- a/stack/rtmac/rtmac_disc.c
+++ b/stack/rtmac/rtmac_disc.c
@@ -35,7 +35,11 @@
 
 
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)
 static rwlock_t disc_list_lock = RW_LOCK_UNLOCKED;
+#else
+static rwlock_t disc_list_lock = __RW_LOCK_UNLOCKED(ioctl_handler_lock);
+#endif
 
 LIST_HEAD(disc_list);
 
diff --git a/stack/rtnet_chrdev.c b/stack/rtnet_chrdev.c
index be4a496..985ffb3 100644
--- a/stack/rtnet_chrdev.c
+++ b/stack/rtnet_chrdev.c
@@ -36,7 +36,11 @@
 #include <ipv4/route.h>
 
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0)
 static rwlock_t ioctl_handler_lock = RW_LOCK_UNLOCKED;
+#else
+static rwlock_t ioctl_handler_lock = __RW_LOCK_UNLOCKED(ioctl_handler_lock);
+#endif
 
 LIST_HEAD(ioctl_handlers);
 
-- 
1.7.4.1


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
RTnet-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-developers

Reply via email to