diff options
author | John Klug <john.klug@multitech.com> | 2021-09-08 14:08:02 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2021-09-08 08:17:54 -0500 |
commit | e6647688deb733302254d52ace74e8d8812b366c (patch) | |
tree | 784c64ec104f495787b81f989d4091d95362f49d /io-module | |
parent | 1d2d4cb343e6d8b290e801a7dc776f9fb0aa8999 (diff) | |
download | mts-io-e6647688deb733302254d52ace74e8d8812b366c.tar.gz mts-io-e6647688deb733302254d52ace74e8d8812b366c.tar.bz2 mts-io-e6647688deb733302254d52ace74e8d8812b366c.zip |
Fix mts-io radio-udev-discovery feature for Linux 5.44.7.1
Diffstat (limited to 'io-module')
-rw-r--r-- | io-module/mts_io_module.h | 2 | ||||
-rw-r--r-- | io-module/radio_udev_discovery.c | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/io-module/mts_io_module.h b/io-module/mts_io_module.h index 3219753..15e4b9a 100644 --- a/io-module/mts_io_module.h +++ b/io-module/mts_io_module.h @@ -5,7 +5,7 @@ * MTAC cards. */ -#define DRIVER_VERSION "v4.7.0" +#define DRIVER_VERSION "v4.7.1" #define DRIVER_AUTHOR "Multitech Systems" #define DRIVER_DESC "MTS-IO Controller" #define DRIVER_NAME "mts-io" diff --git a/io-module/radio_udev_discovery.c b/io-module/radio_udev_discovery.c index eb6c1aa..c6cc98a 100644 --- a/io-module/radio_udev_discovery.c +++ b/io-module/radio_udev_discovery.c @@ -1,6 +1,11 @@ #include <linux/types.h> #include <linux/errno.h> #include <linux/platform_device.h> +#include <linux/pid.h> +#include <linux/version.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0) +#include <linux/signalfd.h> +#endif #include "mts_io_module.h" #include "radio_udev_discovery.h" @@ -48,7 +53,7 @@ verify_vpid(struct sig_pid_radio_reset_monitor_s *p) rcu_read_lock(); vpid1 = find_vpid((pid_t)pid0); if(vpid1 != NULL) - vcount = atomic_read(&vpid1->count); + vcount = refcount_read(&vpid1->count); else vcount = 0; rcu_read_unlock(); @@ -105,7 +110,8 @@ ssize_t mts_attr_store_radio_reset_monitor(struct device *dev, struct device_att rcu_read_unlock(); pr_debug("%s: slot %d: pid %d, vpid 0x%x/vpid 0x%x\n", __FUNCTION__, - i,pid0,vpid0,sig_pid_radio_reset_monitor[i].vpid); + i,(int)pid0,(unsigned int)vpid0, + (unsigned int)sig_pid_radio_reset_monitor[i].vpid); mutex_lock(&mts_io_mutex); if (vpid0 != sig_pid_radio_reset_monitor[i].vpid) { sig_pid_radio_reset_monitor[i].pid = 0; /* Maybe exited? */ @@ -129,7 +135,7 @@ ssize_t mts_attr_store_radio_reset_monitor(struct device *dev, struct device_att } // Location matches our pid } // Loop through table - pr_debug("%s: found=%d, sig=%d\n",__FUNCTION__,sig); + pr_debug("%s: found=%d, sig=%d\n",__FUNCTION__,found,sig); if (found > -1) { mutex_unlock(&mts_io_mutex); return count; |