• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

device/generic/common


Commit MetaInfo

Revisióne0854547dfc34d9ce1348eff447cc950b9f8a4cb (tree)
Tiempo2018-02-23 12:45:59
AutorMauro Rossi <issor.oruam@gmai...>
CommiterChih-Wei Huang

Log Message

tp_smapi/hdaps: use timer_setup() with kernel 4.15 and later

Fixes the following building error happening with kernel 4.15:

CC [M] .../out/target/product/x86/obj/kmodule/tp_smapi/hdaps.o

.../out/target/product/x86/obj/kmodule/tp_smapi/hdaps.c: In function 'hdaps_init':
.../out/target/product/x86/obj/kmodule/tp_smapi/hdaps.c:782:2:
error: implicit declaration of function 'init_timer' [-Werror=implicit-function-declaration]

init_timer(&hdaps_timer);

.../out/target/product/x86/obj/kmodule/tp_smapi/hdaps.c:783:23:
warning: assignment from incompatible pointer type

hdaps_timer.function = hdaps_mousedev_poll;

cc1: some warnings being treated as errors

Cambiar Resumen

Diferencia incremental

--- a/tp_smapi/hdaps.c
+++ b/tp_smapi/hdaps.c
@@ -779,8 +779,12 @@ static int __init hdaps_init(void)
779779 hdaps_invert = 0; /* default */
780780
781781 /* Init timer before platform_driver_register, in case of suspend */
782+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
783+ timer_setup(&hdaps_timer, hdaps_mousedev_poll, 0);
784+#else
782785 init_timer(&hdaps_timer);
783786 hdaps_timer.function = hdaps_mousedev_poll;
787+#endif
784788 ret = platform_driver_register(&hdaps_driver);
785789 if (ret)
786790 goto out;