Input: psmouse - factor out common protocol probing code
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 28 Nov 2015 05:17:40 +0000 (21:17 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 17 Dec 2015 23:24:21 +0000 (15:24 -0800)
commitc378b5119eb0ea25bfd3348a06b51fca654d9903
tree61b774b7573e7e428ba0b43d20876a302549017f
parent5fa75cfe23633edf2fd26abe4a08f22ced4415d1
Input: psmouse - factor out common protocol probing code

In preparation of limiting protocols that we try on pass-through ports,
let's rework initialization code and factor common code into
psmouse_try_protocol() that accepts protocol type (instead of detec()
function pointer) and can, for most protocols, perform both detection and
initialization.

Note that this removes option of forcing Lifebook protocol on devices that
are not recognized by lifebook_detect() as having the hardware, but I do
not recall anyone using this option.

Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Marcin Sochacki <msochacki+kernel@gmail.com>
Tested-by: Till <till2.schaefer@uni-dortmund.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/psmouse-base.c