diff options
Diffstat (limited to 'io-module/radio_udev_discovery.c')
-rw-r--r-- | io-module/radio_udev_discovery.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/io-module/radio_udev_discovery.c b/io-module/radio_udev_discovery.c index c6cc98a..88f5d0d 100644 --- a/io-module/radio_udev_discovery.c +++ b/io-module/radio_udev_discovery.c @@ -52,9 +52,13 @@ verify_vpid(struct sig_pid_radio_reset_monitor_s *p) mutex_unlock(&mts_io_mutex); rcu_read_lock(); vpid1 = find_vpid((pid_t)pid0); - if(vpid1 != NULL) - vcount = refcount_read(&vpid1->count); - else + if(vpid1 != NULL) { + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) + vcount = refcount_read(&vpid1->count); + #else + vcount = atomic_read(&vpid1->count); + #fi + } else vcount = 0; rcu_read_unlock(); mutex_lock(&mts_io_mutex); |