Line 1253
Link Here
|
|
|
1253 |
#define USB_VENDOR_ID_CHERRY 0x046a |
1254 |
#define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023 |
Line 1256
Link Here
|
1256 |
return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), |
1259 |
int retval; |
1257 |
-- |
1260 |
char *p = (char*)buf; |
|
|
1261 |
retval = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), |
Line 1259
Link Here
|
|
|
1265 |
// wn_hack: patch wrong descriptor for this device |
1266 |
// hardware sends wrong descriptor |
1267 |
if (dev->descriptor.idVendor == USB_VENDOR_ID_CHERRY |
1268 |
&& dev->descriptor.idProduct == USB_DEVICE_ID_CHERRY_CYMOTION |
1269 |
&& size > 12 |
1270 |
&& p[11] == 0x3c |
1271 |
&& p[12] == 0x02) |
1272 |
{ |
1273 |
printk(KERN_DEBUG __FILE__ " : modifying descriptor for Cherry CyMotion keyboard \n"); |
1274 |
p[11] = p[16] = 0xff; |
1275 |
p[12] = p[17] = 0x03; |
1276 |
} |
1277 |
return retval; |