• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

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

device/generic/common


コミットメタ情報

リビジョンe0854547dfc34d9ce1348eff447cc950b9f8a4cb (tree)
日時2018-02-23 12:45:59
作者Mauro Rossi <issor.oruam@gmai...>
コミッターChih-Wei Huang

ログメッセージ

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

変更サマリ

差分

--- 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;