Skip to content

Commit

Permalink
hid register report expects an unsigned int for application. Set to 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpid committed Jul 24, 2018
1 parent 3b991ed commit ecfde9f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions linux/drivers/hid/hid-magicmouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,19 +634,19 @@ static int magicmouse_probe(struct hid_device *hdev,

if (id->product == USB_DEVICE_ID_APPLE_MAGICMOUSE)
report = hid_register_report(hdev, HID_INPUT_REPORT,
MOUSE_REPORT_ID);
MOUSE_REPORT_ID, 0);
else if (id->product == USB_DEVICE_ID_APPLE_MAGICTRACKPAD) {
report = hid_register_report(hdev, HID_INPUT_REPORT,
TRACKPAD_REPORT_ID);
TRACKPAD_REPORT_ID, 0);
report = hid_register_report(hdev, HID_INPUT_REPORT,
DOUBLE_REPORT_ID);
DOUBLE_REPORT_ID, 0);
} else { /* USB_DEVICE_ID_APPLE_MAGICTRACKPAD2 */
if (id->vendor == BT_VENDOR_ID_APPLE)
report = hid_register_report(hdev, HID_INPUT_REPORT,
TRACKPAD2_BT_REPORT_ID);
TRACKPAD2_BT_REPORT_ID, 0);
else /* USB_VENDOR_ID_APPLE */
report = hid_register_report(hdev, HID_INPUT_REPORT,
TRACKPAD2_USB_REPORT_ID);
TRACKPAD2_USB_REPORT_ID, 0);
}

if (!report) {
Expand Down

3 comments on commit ecfde9f

@adam-h
Copy link
Contributor

@adam-h adam-h commented on ecfde9f Jul 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For kernel 4.17 support this commit needs to be reverted. Just an FYI for others who may want to run this on 4.17 as I am

@rohitpid
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, this is for 4.18 and newer with the goal of mainlining it.

@sushrest
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adam-h Thanks .. this worked form me I am on 4.15

Please sign in to comment.