Skip to content

HID: hid-lg, hid-lg4ff: Mostly cleanup patches

Michal Malý linux-input lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest15 patches 2 repliesIn review
  2. v112 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Split previous patch 7 into three smaller patches
- Split the long line of text in patch 5 (now patch 6)
- Add another cleanup patch that removes unnecessary casts from void *

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15HID: hid-lg4ff: (Cleanup) Remove double underscore prefix from numeric types.drivers/hid/hid-lg4ff.c drivers/hid/hid-lg4ff.h+28 -280 replies
2/15HID: hid-lg4ff: (Cleanup) Remove "hid_" prefix from some functions' names.drivers/hid/hid-lg4ff.c+14 -140 replies
3/15HID: hid-lg4ff: (Cleanup) Replace DEVICE_ATTR_RW with DEVICE_ATTR to have all internal functions prefixed with "lg4ff_"drivers/hid/hid-lg4ff.c+6 -60 replies
4/15HID: hid-lg4ff: (Cleanup) Remove unused variable from the "lg4ff_device_entry" struct.drivers/hid/hid-lg4ff.c+0 -10 replies
5/15HID: hid-lg4ff: (Cleanup) Explicit casts from void * are not necessarydrivers/hid/hid-lg4ff.c+2 -20 replies
6/15HID: hid-lg4ff: Update a warning message for a case where device is incorrectly flagged to be handled by hid-lg4ff in hid-lg.drivers/hid/hid-lg4ff.c+3 -20 replies
7/15HID: hid-lg: Check return values from lg[N]ff_init()drivers/hid/hid-lg.c+7 -40 replies
8/15HID: hid-lg4ff: Make lg4ff_wheel_data a separate structure stored within lg4ff_device_entry. Adjust the initialization process accordingly.drivers/hid/hid-lg4ff.c+88 -780 replies
9/15HID: hid-lg4ff: Stop the hid device from lg4ff.drivers/hid/hid-lg.c drivers/hid/hid-lg4ff.c+4 -20 replies
10/15HID: hid-lg4ff: Protect concurrent access to output HID report with a spinlockdrivers/hid/hid-lg4ff.c+110 -00 replies
11/15HID: hid-lg4ff: Store pointer to the output HID report struct in the device entry struct.drivers/hid/hid-lg4ff.c+32 -350 replies
12/15HID: hid-lg4ff: Constify those members of lg4ff_device_entry struct whose value is not supposed to change.drivers/hid/hid-lg4ff.c+39 -150 replies
13/15HID: hid-lg4ff: Allow the driver to continue without sysfs interface.drivers/hid/hid-lg4ff.c+3 -40 replies
14/15HID: hid-lg4ff: Update respective sysfs interface documentationDocumentation/ABI/testing/sysfs-driver-hid-logitech-lg4ff+4 -40 replies
15/15HID: hid-lg: Only one of LG_FF flags can be set for a given device.drivers/hid/hid-lg.c+3 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 00/15] HID: hid-lg, hid-lg4ff: Mostly cleanup patches

Hello everyone,

this is a mostly boring series that deals with a few inconsistencies in the code that have accumulated over the years. Besides that it patches up a handful of problems such a return values not being checked etc.

The only significant change comes in patches 8 through 10 which introduce a spinlock to handle concurrent access to the HID report that is used by the driver to send data to the wheel. I would appreciate some comments on this one, particularly on the way it handles deinitialization. Patches 8 and 9 contain the necessary prep work, patch 10 adds the spinlocking.

v2:
- Split previous patch 7 into three smaller patches
- Split the long line of text in patch 5 (now patch 6)
- Add another cleanup patch that removes unnecessary casts from void *

Michal Malý (15):
HID: hid-lg4ff: (Cleanup) Remove double underscore prefix from numeric
types.
HID: hid-lg4ff: (Cleanup) Remove "hid_" prefix from some functions'
names.
HID: hid-lg4ff: (Cleanup) Replace DEVICE_ATTR_RW with DEVICE_ATTR to
have all internal functions prefixed with "lg4ff_"
HID: hid-lg4ff: (Cleanup) Remove unused variable from the
"lg4ff_device_entry" struct.
HID: hid-lg4ff: (Cleanup) Explicit casts from void * are not necessary
HID: hid-lg4ff: Update a warning message for a case where device is
incorrectly flagged to be handled by hid-lg4ff in hid-lg.
HID: hid-lg: Check return values from lg[N]ff_init()
HID: hid-lg4ff: Make lg4ff_wheel_data a separate structure stored
within lg4ff_device_entry. Adjust the initialization process
accordingly.
HID: hid-lg4ff: Stop the hid device from lg4ff.
HID: hid-lg4ff: Protect concurrent access to output HID report with
a spinlock
HID: hid-lg4ff: Store pointer to the output HID report struct in the
device entry struct.
HID: hid-lg4ff: Constify those members of lg4ff_device_entry struct
whose value is not supposed to change.
HID: hid-lg4ff: Allow the driver to continue without sysfs interface.
HID: hid-lg4ff: Update respective sysfs interface documentation
HID: hid-lg: Only one of LG_FF flags can be set for a given device.

 .../ABI/testing/sysfs-driver-hid-logitech-lg4ff    |   8 +-
 drivers/hid/hid-lg.c                               |  21 +-
 drivers/hid/hid-lg4ff.c                            | 458 ++++++++++++++-------
 drivers/hid/hid-lg4ff.h                            |   4 +-
 4 files changed, 318 insertions(+), 173 deletions(-)
Signature · 6 lines
2.3.5

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html