gl-mifi-mcu: make compatible with newer kernel (fix #21198)
authorNuno Gonçalves <nunojpg@gmail.com>
Sun, 28 May 2023 21:06:35 +0000 (22:06 +0100)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Sat, 2 Sep 2023 14:11:28 +0000 (16:11 +0200)
Signed-off-by: Nuno Gonçalves <nunojpg@gmail.com>
(cherry picked from commit 9536d28384d0d924e8b03ce42dbc2d61ce4174d0)

utils/gl-mifi-mcu/Makefile
utils/gl-mifi-mcu/src/module.c

index 08183d91e36edb66ce11c42b9d51c2a03ac76cb7..dd47e2d5535b5156d3746a277f7d2bfe06b1ab33 100755 (executable)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=gl-mifi-mcu
-PKG_VERSION:=1
+PKG_VERSION:=2
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
index 98fc7fab80557ca47603651c4bf0d17a5f1ae3a0..b73016ee836fc8aac5af190f4605b947235a0d37 100755 (executable)
@@ -54,13 +54,13 @@ static const struct file_operations hello_proc_ops = {
 };
 #endif
 
-static irq_handler_t handle_rx_start(unsigned int irq, void* device, struct pt_regs* registers)
+static irqreturn_t handle_rx_start(int irq, void* device)
 {
   if (rx_bit_index == -1)
   {
     hrtimer_start(&timer_rx, ktime_set(0, period / 2), HRTIMER_MODE_REL);
   }
-  return (irq_handler_t) IRQ_HANDLED;
+  return IRQ_HANDLED;
 }
 
 static enum hrtimer_restart handle_tx(struct hrtimer* timer)
@@ -178,7 +178,7 @@ static int __init gl_mifi_mcu_init(void)
 
   success &= request_irq(
     gpio_to_irq(gpio_rx),
-    (irq_handler_t) handle_rx_start,
+    handle_rx_start,
     IRQF_TRIGGER_FALLING,
     "gl_mifi_mcu_irq_handler",
     NULL) == 0;