linux-stable/drivers/hid
Linus Torvalds 71a7507afb Driver Core changes for 6.2-rc1
Here is the set of driver core and kernfs changes for 6.2-rc1.
 
 The "big" change in here is the addition of a new macro,
 container_of_const() that will preserve the "const-ness" of a pointer
 passed into it.
 
 The "problem" of the current container_of() macro is that if you pass in
 a "const *", out of it can comes a non-const pointer unless you
 specifically ask for it.  For many usages, we want to preserve the
 "const" attribute by using the same call.  For a specific example, this
 series changes the kobj_to_dev() macro to use it, allowing it to be used
 no matter what the const value is.  This prevents every subsystem from
 having to declare 2 different individual macros (i.e.
 kobj_const_to_dev() and kobj_to_dev()) and having the compiler enforce
 the const value at build time, which having 2 macros would not do
 either.
 
 The driver for all of this have been discussions with the Rust kernel
 developers as to how to properly mark driver core, and kobject, objects
 as being "non-mutable".  The changes to the kobject and driver core in
 this pull request are the result of that, as there are lots of paths
 where kobjects and device pointers are not modified at all, so marking
 them as "const" allows the compiler to enforce this.
 
 So, a nice side affect of the Rust development effort has been already
 to clean up the driver core code to be more obvious about object rules.
 
 All of this has been bike-shedded in quite a lot of detail on lkml with
 different names and implementations resulting in the tiny version we
 have in here, much better than my original proposal.  Lots of subsystem
 maintainers have acked the changes as well.
 
 Other than this change, included in here are smaller stuff like:
   - kernfs fixes and updates to handle lock contention better
   - vmlinux.lds.h fixes and updates
   - sysfs and debugfs documentation updates
   - device property updates
 
 All of these have been in the linux-next tree for quite a while with no
 problems, OTHER than some merge issues with other trees that should be
 obvious when you hit them (block tree deletes a driver that this tree
 modifies, iommufd tree modifies code that this tree also touches).  If
 there are merge problems with these trees, please let me know.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCY5wz3A8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+yks0ACeKYUlVgCsER8eYW+x18szFa2QTXgAn2h/VhZe
 1Fp53boFaQkGBjl8mGF8
 =v+FB
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core updates from Greg KH:
 "Here is the set of driver core and kernfs changes for 6.2-rc1.

  The "big" change in here is the addition of a new macro,
  container_of_const() that will preserve the "const-ness" of a pointer
  passed into it.

  The "problem" of the current container_of() macro is that if you pass
  in a "const *", out of it can comes a non-const pointer unless you
  specifically ask for it. For many usages, we want to preserve the
  "const" attribute by using the same call. For a specific example, this
  series changes the kobj_to_dev() macro to use it, allowing it to be
  used no matter what the const value is. This prevents every subsystem
  from having to declare 2 different individual macros (i.e.
  kobj_const_to_dev() and kobj_to_dev()) and having the compiler enforce
  the const value at build time, which having 2 macros would not do
  either.

  The driver for all of this have been discussions with the Rust kernel
  developers as to how to properly mark driver core, and kobject,
  objects as being "non-mutable". The changes to the kobject and driver
  core in this pull request are the result of that, as there are lots of
  paths where kobjects and device pointers are not modified at all, so
  marking them as "const" allows the compiler to enforce this.

  So, a nice side affect of the Rust development effort has been already
  to clean up the driver core code to be more obvious about object
  rules.

  All of this has been bike-shedded in quite a lot of detail on lkml
  with different names and implementations resulting in the tiny version
  we have in here, much better than my original proposal. Lots of
  subsystem maintainers have acked the changes as well.

  Other than this change, included in here are smaller stuff like:

   - kernfs fixes and updates to handle lock contention better

   - vmlinux.lds.h fixes and updates

   - sysfs and debugfs documentation updates

   - device property updates

  All of these have been in the linux-next tree for quite a while with
  no problems"

* tag 'driver-core-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (58 commits)
  device property: Fix documentation for fwnode_get_next_parent()
  firmware_loader: fix up to_fw_sysfs() to preserve const
  usb.h: take advantage of container_of_const()
  device.h: move kobj_to_dev() to use container_of_const()
  container_of: add container_of_const() that preserves const-ness of the pointer
  driver core: fix up missed drivers/s390/char/hmcdrv_dev.c class.devnode() conversion.
  driver core: fix up missed scsi/cxlflash class.devnode() conversion.
  driver core: fix up some missing class.devnode() conversions.
  driver core: make struct class.devnode() take a const *
  driver core: make struct class.dev_uevent() take a const *
  cacheinfo: Remove of_node_put() for fw_token
  device property: Add a blank line in Kconfig of tests
  device property: Rename goto label to be more precise
  device property: Move PROPERTY_ENTRY_BOOL() a bit down
  device property: Get rid of __PROPERTY_ENTRY_ARRAY_EL*SIZE*()
  kernfs: fix all kernel-doc warnings and multiple typos
  driver core: pass a const * into of_device_uevent()
  kobject: kset_uevent_ops: make name() callback take a const *
  kobject: kset_uevent_ops: make filter() callback take a const *
  kobject: make kobject_namespace take a const *
  ...
2022-12-16 03:54:54 -08:00
..
amd-sfh-hid HID: amd_sfh: Handle condition of "no sensors" for SFH1.1 2022-09-30 10:31:18 +02:00
i2c-hid for-linus-2022121301 2022-12-13 13:32:56 -08:00
intel-ish-hid HID: intel-ish-hid: ishtp: remove variable rb_count 2022-11-14 17:24:44 +01:00
surface-hid HID: surface-hid: Add support for hot-removal 2022-06-13 17:25:08 +02:00
usbhid USB: make devnode() callback in usb_class_driver take a const * 2022-10-20 12:11:56 +02:00
.kunitconfig HID: uclogic: Add KUnit tests for uclogic_rdesc_template_apply() 2022-06-15 15:51:46 +02:00
Kconfig HID: mcp2221: add ADC/DAC support via iio subsystem 2022-10-18 15:00:01 +02:00
Makefile Merge branch 'for-6.1/uclogic' into for-linus 2022-10-05 10:34:48 +01:00
hid-a4tech.c HID: a4tech: use A4_2WHEEL_MOUSE_HACK_B8 for A4TECH NB-95 2021-05-05 14:29:13 +02:00
hid-accutouch.c
hid-alps.c HID: hid-alps: use default remove for hid device 2022-11-21 22:17:10 +01:00
hid-apple.c HID: apple: Swap Control and Command keys on Apple keyboards 2022-11-14 23:46:20 +01:00
hid-appleir.c HID: appleir: Use devm_kzalloc() instead of kzalloc() 2020-03-13 17:33:11 +01:00
hid-asus.c HID: asus: Remove unused variable in asus_report_tool_width() 2022-11-02 14:11:06 +01:00
hid-aureal.c
hid-axff.c
hid-belkin.c
hid-betopff.c HID: betop: fix slab-out-of-bounds Write in betop_probe 2021-09-15 16:31:21 +02:00
hid-bigbenff.c HID: bigben: fix slab-out-of-bounds Write in bigben_probe 2022-05-06 10:46:36 +02:00
hid-cherry.c
hid-chicony.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-cmedia.c HID: cmedia: add support for HS-100B mute button 2021-07-28 11:51:07 +02:00
hid-core.c HID: core: fix shift-out-of-bounds in hid_report_raw_event 2022-11-21 22:09:01 +01:00
hid-corsair.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-cougar.c HID: cougar: Make use of the helper function devm_add_action_or_reset() 2021-10-07 13:37:25 +02:00
hid-cp2112.c HID: cp2112: prevent a buffer overflow in cp2112_xfer() 2022-06-09 10:55:46 +02:00
hid-creative-sb0540.c
hid-cypress.c HID: cypress: Support Varmilo Keyboards' media hotkeys 2020-10-23 13:23:44 +02:00
hid-debug.c HID: add mapping for camera access keys 2022-11-22 17:50:36 -08:00
hid-dr.c
hid-elan.c HID: hid-elan: use default remove for hid device 2022-11-21 22:17:10 +01:00
hid-elecom.c HID: elecom: drop stray comment 2020-11-25 17:40:23 +01:00
hid-elo.c HID: elo: Revert USB reference counting 2022-02-17 14:14:41 +01:00
hid-emsff.c
hid-ezkey.c
hid-ft260.c HID: ft260: fix 'cast to restricted' kernel CI bot warnings 2022-11-11 11:09:36 +01:00
hid-gaff.c
hid-gembird.c
hid-generic.c
hid-gfrm.c
hid-glorious.c HID: Add driver fixing Glorious PC Gaming Race mouse report descriptor 2020-03-18 13:36:21 +01:00
hid-google-hammer.c HID: vivaldi: convert to use dev_groups 2022-08-25 11:37:21 +02:00
hid-gt683r.c HID: gt683r: add missing MODULE_DEVICE_TABLE 2021-05-27 15:40:34 +02:00
hid-gyration.c
hid-holtek-kbd.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-holtek-mouse.c HID: holtek: fix mouse probing 2021-12-20 11:25:42 +01:00
hid-holtekff.c
hid-hyperv.c Merge branch 'for-6.2/hyperv' into for-linus 2022-12-13 14:32:07 +01:00
hid-icade.c
hid-ids.h HID: usbhid: Add ALWAYS_POLL quirk for some mice 2022-11-22 10:25:30 +01:00
hid-input.c for-linus-2022121301 2022-12-13 13:32:56 -08:00
hid-ite.c HID: ite: Enable QUIRK_TOUCHPAD_ON_OFF_REPORT on Acer Aspire Switch V 10 2022-11-14 23:55:12 +01:00
hid-jabra.c
hid-kensington.c
hid-keytouch.c
hid-kye.c HID: uclogic: Switch to Digitizer usage for styluses 2022-05-11 14:19:27 +02:00
hid-lcpower.c
hid-led.c HID: hid-led: fix maximum brightness for Dream Cheeky 2022-04-21 10:28:49 +02:00
hid-lenovo.c HID: lenovo: Make array tp10ubkbd_led static const 2022-10-18 14:43:59 +02:00
hid-letsketch.c HID: Add new Letsketch tablet driver 2022-01-06 14:22:51 +01:00
hid-lg-g15.c HID: lg-g15: Fix comment typo 2022-07-21 13:47:12 +02:00
hid-lg.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-lg.h
hid-lg2ff.c
hid-lg3ff.c
hid-lg4ff.c HID: hid-lg4ff: Add check for empty lbuf 2022-11-14 23:56:52 +01:00
hid-lg4ff.h
hid-lgff.c
hid-logitech-dj.c HID: logitech-dj: add new lightspeed receiver id 2022-02-16 16:26:21 +01:00
hid-logitech-hidpp.c Merge branch 'for-6.2/logitech' into for-linus 2022-12-13 14:35:07 +01:00
hid-macally.c HID: macally: Constify macally_id_table 2020-08-17 11:38:49 +02:00
hid-magicmouse.c HID: magicmouse: Do not set BTN_MOUSE on double report 2022-10-14 10:47:50 +01:00
hid-maltron.c
hid-mcp2221.c HID: mcp2221: correct undefined references when CONFIG_GPIOLIB isn't defined 2022-10-21 13:44:05 +02:00
hid-megaworld.c HID: Add support for Mega World controller force feedback 2022-05-06 08:29:26 +02:00
hid-mf.c HID: mf: add support for 0079:1846 Mayflash/Dragonrise USB Gamecube Adapter 2020-11-25 14:30:33 +01:00
hid-microsoft.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid 2020-09-02 12:55:46 -07:00
hid-monterey.c
hid-multitouch.c HID: multitouch: Add memory barriers 2022-09-20 12:13:40 +01:00
hid-nintendo.c HID: nintendo: check analog user calibration for plausibility 2022-09-21 13:25:26 +01:00
hid-nti.c
hid-ntrig.c
hid-ortek.c
hid-penmount.c
hid-petalynx.c
hid-picolcd.h
hid-picolcd_backlight.c
hid-picolcd_cir.c media: rc: harmonize infrared durations to microseconds 2020-09-03 16:18:55 +02:00
hid-picolcd_core.c HID: hid-picolcd_core: Remove unused variable 'ret' 2021-04-07 18:46:20 +02:00
hid-picolcd_debugfs.c
hid-picolcd_fb.c fbdev: Rename pagelist to pagereflist for deferred I/O 2022-05-03 16:04:22 +02:00
hid-picolcd_lcd.c
hid-picolcd_leds.c
hid-pl.c
hid-plantronics.c HID: plantronics: Workaround for double volume key presses 2021-03-08 11:08:58 +01:00
hid-playstation.c HID: playstation: fix DualShock4 bluetooth CRC endian issue. 2022-11-17 00:46:13 +01:00
hid-primax.c
hid-prodikeys.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-pxrc.c HID: Add driver for PhoenixRC Flight Controller 2022-09-20 11:36:21 +01:00
hid-quirks.c HID: usbhid: Add ALWAYS_POLL quirk for some mice 2022-11-22 10:25:30 +01:00
hid-razer.c HID: Add driver for Razer Blackwidow keyboards 2022-02-16 17:12:14 +01:00
hid-redragon.c
hid-retrode.c
hid-rmi.c HID: i2c: let RMI devices decide what constitutes wakeup event 2022-11-21 18:56:20 +01:00
hid-roccat-arvo.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-roccat-arvo.h
hid-roccat-common.c
hid-roccat-common.h
hid-roccat-isku.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-roccat-isku.h
hid-roccat-kone.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-roccat-kone.h HID: roccat: Use struct_group() to zero kone_mouse_event 2021-09-25 08:20:48 -07:00
hid-roccat-koneplus.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-roccat-koneplus.h
hid-roccat-konepure.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-roccat-kovaplus.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-roccat-kovaplus.h
hid-roccat-lua.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-roccat-lua.h
hid-roccat-pyra.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-roccat-pyra.h
hid-roccat-ryos.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-roccat-savu.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-roccat-savu.h
hid-roccat.c HID: roccat: Fix use-after-free in roccat_read() 2022-09-20 14:49:15 +02:00
hid-saitek.c HID: saitek: add madcatz variant of MMO7 mouse device ID 2022-10-18 14:42:45 +02:00
hid-samsung.c HID: check for valid USB device for many HID drivers 2021-12-02 15:36:18 +01:00
hid-semitek.c HID: semitek: new driver for GK6X series keyboards 2021-05-05 14:21:08 +02:00
hid-sensor-custom.c HID: hid-sensor-custom: set fixed size for custom attributes 2022-11-21 22:13:40 +01:00
hid-sensor-hub.c HID: hid-sensor-hub: Return error for hid_set_field() failure 2021-05-05 14:36:18 +02:00
hid-sigmamicro.c HID: add SiGma Micro driver 2022-02-02 15:12:22 +01:00
hid-sjoy.c
hid-sony.c HID: sony: Fix double word in comments 2022-09-20 11:27:29 +01:00
hid-speedlink.c
hid-steam.c Merge branch 'for-6.1/core' into for-linus 2022-10-05 10:19:06 +01:00
hid-steelseries.c
hid-sunplus.c
hid-thrustmaster.c HID: thrustmaster: Add sparco wheel and fix array length 2022-08-25 11:38:55 +02:00
hid-tivo.c
hid-tmff.c HID: thrustmaster use swap() to make code cleaner 2021-12-14 10:50:23 +01:00
hid-topre.c hid: topre: Add driver fixing report descriptor 2022-09-20 12:16:25 +01:00
hid-topseed.c
hid-twinhan.c
hid-u2fzero.c hwrng: u2fzero - account for high quality RNG 2022-11-25 17:39:19 +08:00
hid-uclogic-core.c HID: uclogic: Add HID_QUIRK_HIDINPUT_FORCE quirk 2022-11-21 18:35:01 +01:00
hid-uclogic-params-test.c HID: uclogic: Standardize test name prefix 2022-11-14 15:03:48 +01:00
hid-uclogic-params.c HID: uclogic: Add support for XP-PEN Deco LW 2022-11-04 15:53:25 +01:00
hid-uclogic-params.h HID: uclogic: Parse the UGEE v2 frame type 2022-08-25 10:26:31 +02:00
hid-uclogic-rdesc-test.c HID: uclogic: Standardize test name prefix 2022-11-14 15:03:48 +01:00
hid-uclogic-rdesc.c Merge branch 'for-6.2/uclogic' into for-linus 2022-12-13 14:42:10 +01:00
hid-uclogic-rdesc.h HID: uclogic: Add support for XP-PEN Deco LW 2022-11-04 15:53:25 +01:00
hid-udraw-ps3.c HID: udraw-ps3: Replace HTTP links with HTTPS ones 2020-07-20 12:24:41 +02:00
hid-viewsonic.c HID: uclogic: Switch to Digitizer usage for styluses 2022-05-11 14:19:27 +02:00
hid-vivaldi-common.c HID: vivaldi: convert to use dev_groups 2022-08-25 11:37:21 +02:00
hid-vivaldi-common.h HID: vivaldi: convert to use dev_groups 2022-08-25 11:37:21 +02:00
hid-vivaldi.c HID: vivaldi: convert to use dev_groups 2022-08-25 11:37:21 +02:00
hid-vrc2.c HID: Add driver for VRC-2 Car Controller 2022-09-20 11:35:00 +01:00
hid-waltop.c
hid-wiimote-core.c HID: wiimote: Add support for the DJ Hero turntable 2022-11-04 09:57:16 +01:00
hid-wiimote-debug.c
hid-wiimote-modules.c HID: wiimote: Add support for the DJ Hero turntable 2022-11-04 09:57:16 +01:00
hid-wiimote.h HID: wiimote: Add support for the DJ Hero turntable 2022-11-04 09:57:16 +01:00
hid-xiaomi.c HID: Add support for side buttons of Xiaomi Mi Dual Mode Wireless Mouse Silent 2021-09-22 11:53:07 +02:00
hid-xinmo.c
hid-zpff.c
hid-zydacron.c
hidraw.c HID: hidraw: fix memory leak in hidraw_release() 2022-08-25 11:30:50 +02:00
uhid.c uaccess: remove CONFIG_SET_FS 2022-02-25 09:36:06 +01:00
wacom.h HID: wacom: Simplify comments 2022-08-25 11:32:31 +02:00
wacom_sys.c Merge branch 'for-6.1/wacom' into for-linus 2022-10-05 10:36:30 +01:00
wacom_wac.c HID: wacom: Fix logic used for 3rd barrel switch emulation 2022-11-04 09:34:38 +01:00
wacom_wac.h HID: wacom: Simplify comments 2022-08-25 11:32:31 +02:00