[RTnet-developers] [PATCH 2/5] Fix issues with RW_LOCK_UNLOCKED for Linux 3.x
Brought to you by:
bet-frogger,
kiszka
From: Wolfgang G. <wg...@gr...> - 2011-11-17 13:47:04
|
From: Wolfgang Grandegger <wg...@de...> Signed-off-by: Wolfgang Grandegger <wg...@de...> --- 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 |