]> git.baikalelectronics.ru Git - kernel.git/commit
Input: psmouse - clean up Cypress probe
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 3 Dec 2015 00:50:42 +0000 (16:50 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 17 Dec 2015 23:24:04 +0000 (15:24 -0800)
commit94edf0506623267b668d20b761eafc09e94346b0
tree190b929c1373bdfdd7a09b91792609cb037aae07
parent4b9d7664c15d2b823e84bbae75b148016a5b0423
Input: psmouse - clean up Cypress probe

When Cypress protocol support is disabled cypress_init() is a stub that
always returns -ENOSYS, so there is not point in testing for
CONFIG_MOUSE_PS2_CYPRESS after we decided that we are dealing with a
Cypress device. Also, we should only be calling cypress_detect() when
set_properties argument is "true", like with other protocols.

There is a slight change in behavior to make follow-up patches more
uniform: when we detect Cypress but its initialization fails, instead of
immediately returning PSMOUSE_PS2 protocol we now continue trying
IntelliMouse [Explorer]. Given that Cypress devices only have issue with
Sentelic probes probing Imtellimouse should be safe.

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