From: Nikolai Kondrashov Date: Tue, 29 Jul 2014 12:50:06 +0000 (+0300) Subject: HID: huion: Fix sparse warnings X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f20f6eccffcbc0d46d7b70624fea75ac5c970c47;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git HID: huion: Fix sparse warnings 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 Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-huion.c b/drivers/hid/hid-huion.c index 438b54e147bb..60f44cd1b0ed 100644 --- a/drivers/hid/hid-huion.c +++ b/drivers/hid/hid-huion.c @@ -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