OSDN Git Service

Update tp_smapi to 0.43
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 19 Dec 2018 04:05:28 +0000 (12:05 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 19 Dec 2018 04:05:28 +0000 (12:05 +0800)
Copied from https://github.com/evgeni/tp_smapi
commit a63729a.

tp_smapi/hdaps.c
tp_smapi/thinkpad_ec.c
tp_smapi/tp_smapi.c

index 338f551..76930a3 100644 (file)
@@ -62,7 +62,7 @@ static const struct thinkpad_ec_row ec_accel_args =
 
 #define HDAPS_INPUT_FUZZ       4       /* input event threshold */
 #define HDAPS_INPUT_FLAT       4
-#define KMACT_REMEMBER_PERIOD   (HZ/10) /* keyboard/mouse persistance */
+#define KMACT_REMEMBER_PERIOD   (HZ/10) /* keyboard/mouse persistence */
 
 /* Input IDs */
 #define HDAPS_INPUT_VENDOR     PCI_VENDOR_ID_IBM
@@ -469,7 +469,11 @@ static void hdaps_calibrate(void)
 /* Timer handler for updating the input device. Runs in softirq context,
  * so avoid lenghty or blocking operations.
  */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
 static void hdaps_mousedev_poll(unsigned long unused)
+#else
+static void hdaps_mousedev_poll(struct timer_list *unused)
+#endif
 {
        int ret;
 
@@ -779,11 +783,11 @@ static int __init hdaps_init(void)
                        hdaps_invert = 0; /* default */
 
        /* Init timer before platform_driver_register, in case of suspend */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
-       timer_setup(&hdaps_timer, hdaps_mousedev_poll, 0);
-#else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
        init_timer(&hdaps_timer);
        hdaps_timer.function = hdaps_mousedev_poll;
+#else
+       timer_setup(&hdaps_timer, hdaps_mousedev_poll, 0);
 #endif
        ret = platform_driver_register(&hdaps_driver);
        if (ret)
index 13a707a..a8e812f 100644 (file)
@@ -45,7 +45,7 @@
        #include <linux/semaphore.h>
 #endif
 
-#define TP_VERSION "0.42"
+#define TP_VERSION "0.43"
 
 MODULE_AUTHOR("Shem Multinymous");
 MODULE_DESCRIPTION("ThinkPad embedded controller hardware access");
index 5e17845..76ef161 100644 (file)
@@ -47,7 +47,7 @@
 #include <asm/uaccess.h>
 #include <asm/io.h>
 
-#define TP_VERSION "0.42"
+#define TP_VERSION "0.43"
 #define TP_DESC "ThinkPad SMAPI Support"
 #define TP_DIR "smapi"