linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next v2 00/15] HID: convert to devm_hid_hw_start_and_open()
@ 2024-09-09  1:22 Li Zetao
  2024-09-09  1:22 ` [PATCH -next v2 01/15] HID: core: Use devm_add_action_or_reset helper to manage hid resources Li Zetao
                   ` (14 more replies)
  0 siblings, 15 replies; 30+ messages in thread
From: Li Zetao @ 2024-09-09  1:22 UTC (permalink / raw)
  To: jikos, bentiss, michael.zaidman, gupt21, djogorchock,
	roderick.colenbrander, savicaleksa83, me, jdelvare, linux, mail,
	wilken.gottwalt, jonas, mezin.alexander
  Cc: lizetao1, linux-input, linux-i2c, linux-hwmon

v1 -> v2:
 1) drop some risky patches, such as patch 7, which may have race issues
 2) Some patches can be further optimized. By replacing
hwmon_device_register_with_info with devm_hwmon_device_register_with_info,
the .remove operation can be completely deleted.
 3) Adjust some commit information and use "Use" to replace
"Consider using"

v1:
https://lore.kernel.org/all/20240904123607.3407364-1-lizetao1@huawei.com/

Hi, all

This patchset is dedicated to using the life cycle approach to manage
hid resources. By keeping hid resources consistent with the life cycle
of the device, we ensure that resources are available during the life
cycle and the hid resources can be released before device release.

Going one step further, since the module does not need to recycle hid
resources by itself, the goto-release resource release coding can be
avoided. It also reduces the risk of resources not being released.

Thanks,
Li Zetao.

Li Zetao (15):
  HID: core: Use devm_add_action_or_reset helper to manage hid resources
  HID: cp2112: Use devm_hid_hw_start_and_open in cp2112_probe()
  HID: ft260: Use devm_hid_hw_start_and_open in ft260_probe()
  HID: mcp2200: Use devm_hid_hw_start_and_open in mcp2200_probe()
  HID: mcp2221: Use devm_hid_hw_start_and_open in mcp2221_probe()
  HID: nintendo: Use devm_hid_hw_start_and_open in nintendo_hid_probe()
  HID: playstation: Use devm_hid_hw_start_and_open in ps_probe()
  hwmon: (aquacomputer_d5next) Use devm_hid_hw_start_and_open in
    aqc_probe()
  hwmon: Use devm_hid_hw_start_and_open in rog_ryujin_probe()
  hwmon: (corsair-cpro) Use devm_hid_hw_start_and_open in ccp_probe()
  hwmon: (corsair-psu) Use devm_hid_hw_start_and_open in
    corsairpsu_probe()
  hwmon: (gigabyte_waterforce) Use devm_hid_hw_start_and_open in
    waterforce_probe()
  hwmon: (nzxt-kraken2) Use devm_hid_hw_start_and_open in
    kraken2_probe()
  hwmon: (nzxt-kraken3) Use devm_hid_hw_start_and_open in
    kraken3_probe()
  hwmon: (nzxt-smart2) Use devm_hid_hw_start_and_open in
    nzxt_smart2_hid_probe()

 drivers/hid/hid-core.c              | 40 ++++++++++++++++++++++++
 drivers/hid/hid-cp2112.c            | 26 ++--------------
 drivers/hid/hid-ft260.c             | 32 +++++---------------
 drivers/hid/hid-mcp2200.c           | 22 ++------------
 drivers/hid/hid-mcp2221.c           | 26 ++--------------
 drivers/hid/hid-nintendo.c          | 23 +++-----------
 drivers/hid/hid-playstation.c       | 27 +++--------------
 drivers/hwmon/aquacomputer_d5next.c | 39 ++++++------------------
 drivers/hwmon/asus_rog_ryujin.c     | 47 +++++------------------------
 drivers/hwmon/corsair-cpro.c        | 24 +++------------
 drivers/hwmon/corsair-psu.c         | 24 +++------------
 drivers/hwmon/gigabyte_waterforce.c | 29 +++---------------
 drivers/hwmon/nzxt-kraken2.c        | 45 +++++----------------------
 drivers/hwmon/nzxt-kraken3.c        | 34 +++++----------------
 drivers/hwmon/nzxt-smart2.c         | 38 +++--------------------
 include/linux/hid.h                 |  2 ++
 16 files changed, 114 insertions(+), 364 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2024-09-09 18:46 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-09  1:22 [PATCH -next v2 00/15] HID: convert to devm_hid_hw_start_and_open() Li Zetao
2024-09-09  1:22 ` [PATCH -next v2 01/15] HID: core: Use devm_add_action_or_reset helper to manage hid resources Li Zetao
2024-09-09  1:23 ` [PATCH -next v2 02/15] HID: cp2112: Use devm_hid_hw_start_and_open in cp2112_probe() Li Zetao
2024-09-09  1:23 ` [PATCH -next v2 03/15] HID: ft260: Use devm_hid_hw_start_and_open in ft260_probe() Li Zetao
2024-09-09  1:23 ` [PATCH -next v2 04/15] HID: mcp2200: Use devm_hid_hw_start_and_open in mcp2200_probe() Li Zetao
2024-09-09  1:23 ` [PATCH -next v2 05/15] HID: mcp2221: Use devm_hid_hw_start_and_open in mcp2221_probe() Li Zetao
2024-09-09  1:23 ` [PATCH -next v2 06/15] HID: nintendo: Use devm_hid_hw_start_and_open in nintendo_hid_probe() Li Zetao
2024-09-09  1:23 ` [PATCH -next v2 07/15] HID: playstation: Use devm_hid_hw_start_and_open in ps_probe() Li Zetao
2024-09-09  1:23 ` [PATCH -next v2 08/15] hwmon: (aquacomputer_d5next) Use devm_hid_hw_start_and_open in aqc_probe() Li Zetao
2024-09-09 16:57   ` Guenter Roeck
2024-09-09 17:29   ` Aleksa Savic
2024-09-09  1:23 ` [PATCH -next v2 09/15] hwmon: Use devm_hid_hw_start_and_open in rog_ryujin_probe() Li Zetao
2024-09-09 16:59   ` Guenter Roeck
2024-09-09 17:32   ` Aleksa Savic
2024-09-09  1:23 ` [PATCH -next v2 10/15] hwmon: (corsair-cpro) Use devm_hid_hw_start_and_open in ccp_probe() Li Zetao
2024-09-09 16:59   ` Guenter Roeck
2024-09-09 18:05   ` Marius Zachmann
2024-09-09  1:23 ` [PATCH -next v2 11/15] hwmon: (corsair-psu) Use devm_hid_hw_start_and_open in corsairpsu_probe() Li Zetao
2024-09-09 17:00   ` Guenter Roeck
2024-09-09  1:23 ` [PATCH -next v2 12/15] hwmon: (gigabyte_waterforce) Use devm_hid_hw_start_and_open in waterforce_probe() Li Zetao
2024-09-09 17:00   ` Guenter Roeck
2024-09-09 17:37   ` Aleksa Savic
2024-09-09  1:23 ` [PATCH -next v2 13/15] hwmon: (nzxt-kraken2) Use devm_hid_hw_start_and_open in kraken2_probe() Li Zetao
2024-09-09 17:00   ` Guenter Roeck
2024-09-09 18:23   ` Jonas Malaco
2024-09-09  1:23 ` [PATCH -next v2 14/15] hwmon: (nzxt-kraken3) Use devm_hid_hw_start_and_open in kraken3_probe() Li Zetao
2024-09-09 17:01   ` Guenter Roeck
2024-09-09 17:44   ` Aleksa Savic
2024-09-09  1:23 ` [PATCH -next v2 15/15] hwmon: (nzxt-smart2) Use devm_hid_hw_start_and_open in nzxt_smart2_hid_probe() Li Zetao
2024-09-09 17:01   ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).