Skip to content

Commit

Permalink
HID: huion: Fix sparse warnings
Browse files Browse the repository at this point in the history
Fix sparse warnings in hid-huion.c by using correct buffer type for
retrieved string descriptor.

The warnings in question were:

    drivers/hid/hid-huion.c:144:44: sparse: cast to restricted __le16
    drivers/hid/hid-huion.c:145:44: sparse: cast to restricted __le16
    drivers/hid/hid-huion.c:146:51: sparse: cast to restricted __le16
    drivers/hid/hid-huion.c:147:30: sparse: cast to restricted __le16

Reported-by: fengguang.wu@intel.com
Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Nikolai Kondrashov authored and Jiri Kosina committed Jul 29, 2014
1 parent 3f1f333 commit f20f6ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hid/hid-huion.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static int huion_tablet_enable(struct hid_device *hdev)
int rc;
struct usb_device *usb_dev = hid_to_usb_dev(hdev);
struct huion_drvdata *drvdata = hid_get_drvdata(hdev);
u16 buf[6];
__le16 buf[6];

/*
* Read string descriptor containing tablet parameters. The specific
Expand Down

0 comments on commit f20f6ec

Please sign in to comment.