re: HID: huion: Switch to generating report descriptor
flat view
From: Dan Carpenter <hidden>
Date: 2014-07-31 09:41:01
Hello Nikolai Kondrashov,
The patch f8dd5cb2c6d0: "HID: huion: Switch to generating report
descriptor" from Jul 23, 2014, leads to the following static checker
warning:
drivers/hid/hid-huion.c:126 huion_tablet_enable()
error: doing dma on the stack (buf)
drivers/hid/hid-huion.c
113 static int huion_tablet_enable(struct hid_device *hdev)
114 {
115 int rc;
116 struct usb_device *usb_dev = hid_to_usb_dev(hdev);
117 struct huion_drvdata *drvdata = hid_get_drvdata(hdev);
118 __le16 buf[6];
119
120 /*
121 * Read string descriptor containing tablet parameters. The specific
122 * string descriptor and data were discovered by sniffing the Windows
123 * driver traffic.
124 * NOTE: This enables fully-functional tablet mode.
125 */
126 rc = usb_control_msg(usb_dev, usb_rcvctrlpipe(usb_dev, 0),
127 USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
128 (USB_DT_STRING << 8) + 0x64,
129 0x0409, buf, sizeof(buf),
^^^
130 USB_CTRL_GET_TIMEOUT);
regards,
dan carpenter