Input: usbtouchscreen - correctly set 'phys'
authorVladimir Shebordaev <vladimir.shebordaev@gmail.com>
Fri, 7 Sep 2007 01:32:16 +0000 (21:32 -0400)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 7 Sep 2007 01:32:16 +0000 (21:32 -0400)
This patch fixes a nasty typo in usbtouchscreen driver. The typo
is inherited from the original mtouchusb. It used to make the input
subsytem to incorrectly report the physical device ids to userspace
that in turn is very confusing for, e.g. XInput hotplug facilities
in setups with multiple identical touchscreens.

Signed-off-by: Vladimir Shebordaev <vshebordaev@mail.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/usbtouchscreen.c

index b407028ffc59dcc514fa02d8c66f2aab9065a046..741f6c6f1e506f621e55ec8a580db0154db416cc 100644 (file)
@@ -767,7 +767,7 @@ static int usbtouch_probe(struct usb_interface *intf,
                         le16_to_cpu(udev->descriptor.idProduct));
 
        usb_make_path(udev, usbtouch->phys, sizeof(usbtouch->phys));
                         le16_to_cpu(udev->descriptor.idProduct));
 
        usb_make_path(udev, usbtouch->phys, sizeof(usbtouch->phys));
-       strlcpy(usbtouch->phys, "/input0", sizeof(usbtouch->phys));
+       strlcat(usbtouch->phys, "/input0", sizeof(usbtouch->phys));
 
        input_dev->name = usbtouch->name;
        input_dev->phys = usbtouch->phys;
 
        input_dev->name = usbtouch->name;
        input_dev->phys = usbtouch->phys;