]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
HID: core: Change hid_driver to use a const char* for name
authorRahul Rameshbabu <sergeantsagara@protonmail.com>
Sat, 13 Sep 2025 16:12:54 +0000 (16:12 +0000)
committerBenjamin Tissoires <bentiss@kernel.org>
Wed, 17 Sep 2025 09:48:01 +0000 (11:48 +0200)
commitd1dd75c6500c74b91c5286fd3277710371d3e3ca
tree3b298f5ca17f03a537d1bc671ba8cf46689e6305
parent4c2c5ff9f3d72fb41f884f7c493ae9df83379340
HID: core: Change hid_driver to use a const char* for name

name is never mutated by the core HID stack. Making name a const char*
simplifies passing the string from Rust to C. Otherwise, it becomes
difficult to pass a 'static lifetime CStr from Rust to a char*, rather than
a const char*, due to lack of guarantee that the underlying data of the
CStr will not be mutated by the C code.

Signed-off-by: Rahul Rameshbabu <sergeantsagara@protonmail.com>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
include/linux/hid.h