linux/drivers/hid
Thomas Weißschuh fe73965d07 HID: change return type of report_fixup() to const
By allowing the drivers to return a "const *" they can constify their
static report arrays.
This makes it clear to driver authors that the HID core will not modify
those reports and they can be reused for multiple devices.
Furthermore security is slightly improved as those reports are protected
against accidental or malicious modifications.

[bentiss: fixup hid-cougar.c and hid-multitouch.c for latest version of
the master branch]

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240803-hid-const-fixup-v2-6-f53d7a7b29d8@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-08-27 16:29:55 +02:00
..
amd-sfh-hid HID: amd_sfh: free driver_data after destroying hid device 2024-08-02 12:58:03 +02:00
bpf HID: bpf: constify parameter rdesc of call_hid_bpf_rdesc_fixup() 2024-08-27 16:18:51 +02:00
i2c-hid HID: i2c-hid: elan: fix reset suspend current leakage 2024-06-07 11:18:11 +02:00
intel-ish-hid Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
surface-hid HID: surface-hid: kbd: Convert to platform remove callback returning void 2024-04-03 13:23:23 +02:00
usbhid HID: usbhid: Share USB device firmware node with child HID device 2024-06-06 09:29:07 +02:00
.kunitconfig HID: input: map battery system charging 2022-12-20 15:30:35 +01:00
hid-a4tech.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-accutouch.c
hid-alps.c
hid-apple.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-appleir.c
hid-asus.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-aureal.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-axff.c
hid-belkin.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-betopff.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-bigbenff.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-cherry.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-chicony.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-cmedia.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-core.c HID: constify params and return value of fetch_item() 2024-08-27 16:18:51 +02:00
hid-corsair.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-cougar.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-cp2112.c hid: cp2112: Fix IRQ shutdown stopping polling for all IRQs on chip 2023-10-25 15:19:40 +02:00
hid-creative-sb0540.c
hid-cypress.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-debug.c input: Add support for "Do Not Disturb" 2024-06-07 11:08:07 +02:00
hid-dr.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-elan.c
hid-elecom.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-elo.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-emsff.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-evision.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-ezkey.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-ft260.c
hid-gaff.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-gembird.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-generic.c
hid-gfrm.c
hid-glorious.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-google-hammer.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-google-stadiaff.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-gt683r.c
hid-gyration.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-holtek-kbd.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-holtek-mouse.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-holtekff.c
hid-hyperv.c HID: hyperv: avoid struct memcpy overrun warning 2023-07-09 12:47:37 +02:00
hid-icade.c
hid-ids.h HID: multitouch: Add support for GT7868Q 2024-08-02 13:00:12 +02:00
hid-input-test.c HID: input: map battery system charging 2022-12-20 15:30:35 +01:00
hid-input.c HID: Ignore battery for ELAN touchscreens 2F2C and 4116 2024-06-07 17:02:56 +02:00
hid-ite.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-jabra.c
hid-kensington.c HID: Fix spelling mistakes "Kensigton" -> "Kensington" 2024-07-12 18:28:03 +02:00
hid-keytouch.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-kye.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-lcpower.c HID: add more missing MODULE_DESCRIPTION() macros 2024-07-10 09:11:27 +02:00
hid-led.c
hid-lenovo.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-letsketch.c HID: letsketch: add missing MODULE_DESCRIPTION() macro 2024-06-06 10:51:56 +02:00
hid-lg2ff.c
hid-lg3ff.c HID: hid-lg3ff: remove unused struct lg3ff_device 2024-02-13 11:43:55 +01:00
hid-lg4ff.c
hid-lg4ff.h
hid-lg-g15.c HID: lg-g15: add missing MODULE_DESCRIPTION() macro 2024-06-06 10:52:09 +02:00
hid-lg.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-lg.h
hid-lgff.c
hid-logitech-dj.c Merge branch 'for-6.11/module-description' into for-linus 2024-07-16 12:18:28 +02:00
hid-logitech-hidpp.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-macally.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-magicmouse.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-maltron.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-mcp2200.c HID: mcp2200: added driver for GPIOs of MCP2200 2023-11-21 09:27:18 +01:00
hid-mcp2221.c HID: mcp2221: Remove unnecessary semicolon 2024-07-12 18:30:11 +02:00
hid-megaworld.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-mf.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-microsoft.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-monterey.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-multitouch.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-nintendo.c Merge branch 'for-6.11/nintendo' into for-linus 2024-07-16 12:24:04 +02:00
hid-nti.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-ntrig.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-nvidia-shield.c HID: nvidia-shield: Add missing check for input_ff_create_memless 2024-05-23 14:17:22 +02:00
hid-ortek.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-penmount.c
hid-petalynx.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-picolcd_backlight.c hid: hid-picolcd: Remove struct backlight_ops.check_fb 2024-03-28 10:08:59 +00:00
hid-picolcd_cir.c
hid-picolcd_core.c - Fix-ups 2024-05-22 10:45:12 -07:00
hid-picolcd_debugfs.c
hid-picolcd_fb.c - Fix-ups 2024-05-22 10:45:12 -07:00
hid-picolcd_lcd.c HID: picoLCD: Constify lcd_ops 2024-05-03 10:45:34 +01:00
hid-picolcd_leds.c
hid-picolcd.h
hid-pl.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-plantronics.c HID: plantronics: Additional PIDs for double volume key presses quirk 2022-12-20 15:35:21 +01:00
hid-playstation.c HID: playstation: DS4: Fix calibration workaround for clone devices 2024-05-06 23:31:24 +02:00
hid-primax.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-prodikeys.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-pxrc.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-quirks.c HID: Add quirk for Labtec/ODDOR/aikeec handbrake 2023-12-04 16:21:05 +01:00
hid-razer.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-redragon.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-retrode.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-rmi.c HID: rmi: remove #ifdef CONFIG_PM 2023-10-25 18:33:42 +02:00
hid-roccat-arvo.c HID: roccat: make all 'class' structures const 2023-08-14 11:23:35 +02:00
hid-roccat-arvo.h
hid-roccat-common.c
hid-roccat-common.h
hid-roccat-isku.c HID: roccat: Convert sprintf() family to sysfs_emit() family 2024-04-03 13:42:04 +02:00
hid-roccat-isku.h
hid-roccat-kone.c HID: roccat: Convert sprintf() family to sysfs_emit() family 2024-04-03 13:42:04 +02:00
hid-roccat-kone.h
hid-roccat-koneplus.c HID: roccat: Convert sprintf() family to sysfs_emit() family 2024-04-03 13:42:04 +02:00
hid-roccat-koneplus.h
hid-roccat-konepure.c HID: roccat: make all 'class' structures const 2023-08-14 11:23:35 +02:00
hid-roccat-kovaplus.c HID: roccat: Convert sprintf() family to sysfs_emit() family 2024-04-03 13:42:04 +02:00
hid-roccat-kovaplus.h
hid-roccat-lua.c
hid-roccat-lua.h
hid-roccat-pyra.c HID: roccat: Convert sprintf() family to sysfs_emit() family 2024-04-03 13:42:04 +02:00
hid-roccat-pyra.h
hid-roccat-ryos.c HID: roccat: make all 'class' structures const 2023-08-14 11:23:35 +02:00
hid-roccat-savu.c HID: roccat: make all 'class' structures const 2023-08-14 11:23:35 +02:00
hid-roccat-savu.h
hid-roccat.c HID: roccat: make all 'class' structures const 2023-08-14 11:23:35 +02:00
hid-saitek.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-samsung.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-semitek.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-sensor-custom.c Merge branch 'for-6.10/plarform-driver-remove-new' into for-linus 2024-05-14 13:55:14 +02:00
hid-sensor-hub.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-sigmamicro.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-sjoy.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-sony.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-speedlink.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-steam.c Merge branch 'for-6.11/trivial' into for-linus 2024-07-16 12:19:28 +02:00
hid-steelseries.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-sunplus.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-thrustmaster.c
hid-tivo.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-tmff.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-topre.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-topseed.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-twinhan.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-u2fzero.c
hid-uclogic-core-test.c HID: uclogic: Fix a work->entry not empty bug in __queue_work() 2023-10-25 16:25:47 +02:00
hid-uclogic-core.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-uclogic-params-test.c HID: uclogic: Fix user-memory-access bug in uclogic_params_ugee_v2_init_event_hooks() 2023-10-25 16:25:47 +02:00
hid-uclogic-params.c HID: uclogic: Expose firmware name 2024-04-03 13:51:06 +02:00
hid-uclogic-params.h HID: uclogic: Handle wireless device reconnection 2023-01-18 09:44:57 +01:00
hid-uclogic-rdesc-test.c HID: uclogic: Avoid linking common code into multiple modules 2024-06-19 16:33:10 +02:00
hid-uclogic-rdesc.c Merge branch 'for-6.11/uclogic' into for-linus 2024-07-16 12:24:46 +02:00
hid-uclogic-rdesc.h HID: uclogic: Refactor UGEEv2 probe magic data 2023-01-18 09:44:57 +01:00
hid-udraw-ps3.c
hid-viewsonic.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-vivaldi-common.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-vivaldi-common.h
hid-vivaldi.c
hid-vrc2.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-waltop.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-wiimote-core.c treewide: Convert del_timer*() to timer_shutdown*() 2022-12-25 13:38:09 -08:00
hid-wiimote-debug.c HID: hid-wiimote-debug.c: Drop error checking for debugfs_create_file 2023-08-14 11:14:42 +02:00
hid-wiimote-modules.c
hid-wiimote.h
hid-winwing.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-xiaomi.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hid-xinmo.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-zpff.c HID: add missing MODULE_DESCRIPTION() macros 2024-06-06 10:52:48 +02:00
hid-zydacron.c HID: change return type of report_fixup() to const 2024-08-27 16:29:55 +02:00
hidraw.c HID: bpf: fix gcc warning and unify __u64 into u64 2024-07-01 14:48:11 +02:00
Kconfig HID: Add WinWing Orion2 throttle support 2024-04-03 13:35:44 +02:00
Makefile HID: uclogic: Avoid linking common code into multiple modules 2024-06-19 16:33:10 +02:00
uhid.c HID: uhid: replace deprecated strncpy with strscpy 2023-11-30 13:38:50 -08:00
wacom_sys.c HID: wacom: Do not register input devices until after hid_hw_start 2024-02-06 16:12:07 +01:00
wacom_wac.c HID: wacom: Defer calculation of resolution until resolution_code is known 2024-08-02 13:02:14 +02:00
wacom_wac.h HID: wacom: remove unused hid_data::pressure 2024-02-13 11:43:55 +01:00
wacom.h HID: wacom: Remove AES power_supply after extended inactivity 2023-11-29 16:13:21 +01:00