Fix bug where input is not getting reported

Because the joystick type was never set, the input irq handler never
called the x52pro_decode_urb function. This fixes that issue, however,
it still needs verification that the changes work.
pull/3/head
Nirenjan Krishnan 2012-10-11 20:58:59 -07:00
parent 7db56ee069
commit a69ea22457
1 changed files with 2 additions and 2 deletions

View File

@ -77,8 +77,7 @@ static ssize_t show_text_line(struct device *dev, char *buf, u8 line)
line--; /* Convert to 0-based line number */
if (joy->feat_mfd) {
//return sprintf(buf, "%s\n", joy->line[line].text);
return sprintf(buf, "%s\n", joy->phys);
return sprintf(buf, "%s\n", joy->line[line].text);
} else {
sprintf(buf, "\n");
return -EOPNOTSUPP;
@ -403,6 +402,7 @@ static int x52_probe(struct usb_interface *intf,
dev_err(&intf->dev, "Out of memory: Cannot create joystick\n");
goto error;
}
joy->type = x52_devices[i].type;
idev = input_allocate_device();
if (idev == NULL) {