Input: xpad - don't depend on endpoint order
authorCameron Gutman <aicommander@gmail.com>
Wed, 4 Jan 2017 06:40:38 +0000 (22:40 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 6 Jan 2017 18:31:51 +0000 (10:31 -0800)
commitc01b5e7464f0cf20936d7467c7528163c4e2782d
tree04e599d1b79f15e51a32a1cb8b3ed9c7b8c85f39
parenta8c34e27fb1ece928ec728bfe596aa6ca0b1928a
Input: xpad - don't depend on endpoint order

The order of endpoints is well defined on official Xbox pads, but
we have found at least one 3rd-party pad that doesn't follow the
standard ("Titanfall 2 Xbox One controller" 0e6f:0165).

Fortunately, we get lucky with this specific pad because it uses
endpoint addresses that differ only by direction. We know that
there are other pads out where this is not true, so let's go
ahead and fix this.

Signed-off-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/joystick/xpad.c