From 238e7105be114fc2be4ef50e808cf7031c6caef5 Mon Sep 17 00:00:00 2001 From: Doug Potts Date: Wed, 6 Sep 2023 08:35:07 -0400 Subject: [PATCH] [#17] Update version check to use #defines --- intrepid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/intrepid.c b/intrepid.c index 2a50976..132e1df 100644 --- a/intrepid.c +++ b/intrepid.c @@ -57,8 +57,8 @@ #define KO_DESC "Netdevice driver for Intrepid CAN/Ethernet devices" #define KO_MAJOR 3 -#define KO_MINOR 0 -#define KO_PATCH 2 +#define KO_MINOR 1 +#define KO_PATCH 0 #define KO_VERSION str(KO_MAJOR) "." str(KO_MINOR) "." str(KO_PATCH) #define KO_VERSION_INT (KO_MAJOR << 16) | (KO_MINOR << 8) | KO_PATCH @@ -976,7 +976,7 @@ static long intrepid_dev_ioctl(struct file *fp, unsigned int cmd, unsigned long ret = KO_VERSION_INT; break; case SIOCGCLIENTVEROK: - if (VER_MAJ_FROM_INT(arg) == 3 && VER_MIN_FROM_INT(arg) == 0 && VER_PATCH_FROM_INT(arg) >= 0) + if (VER_MAJ_FROM_INT(arg) == KO_MAJOR && VER_MIN_FROM_INT(arg) == KO_MINOR && VER_PATCH_FROM_INT(arg) >= 0) ret = 0; /* ok to start */ else ret = 1;