From edd98859027a0f970cbccedb4180a7893556350e Mon Sep 17 00:00:00 2001
From: "Suren A. Chilingaryan" <csa@suren.me>
Date: Tue, 18 Jun 2024 23:59:02 +0200
Subject: Support for kernels 6.x: compilation tested on Ubuntu 23.10 & 24.04 &
 operation on Debian 12.5. This still might contain incompatibilities for some
 earlier kernel versions as I was relaying on ChatGPT to find which exact
 kernel version was introducing particular changes

---
 driver/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'driver/base.c')

diff --git a/driver/base.c b/driver/base.c
index 3cd42b8..d600a96 100644
--- a/driver/base.c
+++ b/driver/base.c
@@ -290,7 +290,7 @@ static int __init pcidriver_init(void)
     mod_info("Major %d allocated to nodename '%s'\n", MAJOR(pcidriver_devt), NODENAME);
 
     /* Register driver class */
-    pcidriver_class = class_create(THIS_MODULE, NODENAME);
+    pcidriver_class = class_create_compat(THIS_MODULE, NODENAME);
 
     if (IS_ERR(pcidriver_class)) {
         mod_info("No sysfs support. Module not loaded.\n");
-- 
cgit v1.2.3