Skip to content

hid-magicmouse: delete the second input device

Benjamin Tissoires linux-input 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3HID: Export hid_register_fielddrivers/hid/hid-core.c include/linux/hid.h+3 -10 replies
2/3HID: suppress the second input for the Apple Magic Mouse.drivers/hid/hid-magicmouse.c+172 -264 replies
3/3HID: deletion of unused code in hid-magicmouse.drivers/hid/hid-magicmouse.c+0 -680 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3] hid-magicmouse: delete the second input device

Hi,

in the current implementation of hid-magicmouse, the driver creates two input device. As the Magic Mouse does not reports at the connexion the fields of the multitouch part, the previous implementation creates a second device to report to the user space the other axes.

I manage to remove this second device by manually injecting the fields in the report created by the hid_register_report.

To do that, I had to export the function hid_register_field. This is the object of the first patch.
Then, in the second patch, I inject the fields in the report, thus removing the line containing 'report->size = 6;'
The last patch is just a cleanup.

Cheers,
Benjamin