From a69ea2245742ed1ba669f1d8419aa6551722c27c Mon Sep 17 00:00:00 2001 From: Nirenjan Krishnan Date: Thu, 11 Oct 2012 20:58:59 -0700 Subject: [PATCH] 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. --- driver/x52joy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver/x52joy.c b/driver/x52joy.c index 6145917..5729394 100644 --- a/driver/x52joy.c +++ b/driver/x52joy.c @@ -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) {