HID: logitech-hidpp: rework hidpp_connect_event()
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Mon, 27 Mar 2017 14:59:28 +0000 (16:59 +0200)
committerJiri Kosina <jkosina@suse.cz>
Thu, 6 Apr 2017 12:36:37 +0000 (14:36 +0200)
commit2936836f919af8d766a23fdf2bb945a0d74fa534
tree66b327b33fe735c8bc5f16e80cca92eac668faa9
parent187f2bba93816a300018ad7fb0d79175af0643d3
HID: logitech-hidpp: rework hidpp_connect_event()

Looks like all users don't care about a disconnect.
Simplify the various variant_connect() and put the connect state check
at the beginning.

For delayed input devices, make sure we go through all other connect
values (protocol, battery) before bailing out.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Tested-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-logitech-hidpp.c