Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update module.c to fix compilation errors #25

Merged
merged 4 commits into from
Aug 16, 2022

Conversation

ldravidu
Copy link
Contributor

Changes in the newer Linux versions cause compilation errors during make. These errors were caused by the following changes in the Linux kernel.

  • tty_port::low_latency was removed in linux v5.12
  • tty_unregister_driver() returns void instead of int as of linux v5.13
  • tty_operations::write_room() and tty_operations::chars_in_buffer() returns uint instead of int as of linux v5.14
  • Alias for tty_driver_kref_put(), put_tty_driver() was removed in linux v5.15

This commit make changes to module.c to fix these issues.
Tested on Raspberry Pi Zero 2 W, with Raspbian OS 11.4, kernel Linux v5.15.32-v7+, gcc (Raspbian 10.2.1-6+rpi1) 10.2.1 20210110

`low_latency` is not needed to be defined, since it was removed completely back in 2021 (linux v5.12-rc1)
put_tty_driver() was an alias for tty_driver_kref_put() which was replaced with tty_driver_kref_put() in linux v5.15-rc1
tty_unregister_driver() returns void as of linux v5.13-rc1
@adrianomarto
Copy link
Owner

Great job! Thanks for your contribution!

@adrianomarto adrianomarto merged commit cf9f362 into adrianomarto:master Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants