I saw the same problem. Similar discussion can be found:
I tested a similar fix and was able to get the kernel module built and
running. My fix attached.
** Attachment added: "fix-for-4.15-timer-change"
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
nvidia-304 kernel module failed to build with new bionic kernel
[error: implicit declaration of function ‘init_timer’; did you mean
To manage notifications about this bug go to:
ubuntu-bugs mailing list