summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-logitech-hidpp.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2019-03-22 08:41:39 +0100
committerJiri Kosina <jkosina@suse.cz>2019-04-01 15:14:54 +0200
commit090760d4269d03d05341e428b6a7ef68f94c5dcc (patch)
tree4cef844d10a7e502d3d6745c9a81d4f573090c67 /drivers/hid/hid-logitech-hidpp.c
parent9576af6a95dbabd035a59fa6ffc5b88baa07f221 (diff)
HID: logitech-hidpp: remove hidpp_is_connected()
Remove the hidpp_is_connected() function wrapper, and have the callers directly call hidpp_root_get_protocol_version() instead. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-logitech-hidpp.c')
-rw-r--r--drivers/hid/hid-logitech-hidpp.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index 3795ae90207a..cd4b0befc0e8 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -871,11 +871,6 @@ print_version:
return 0;
}
-static bool hidpp_is_connected(struct hidpp_device *hidpp)
-{
- return hidpp_root_get_protocol_version(hidpp) == 0;
-}
-
/* -------------------------------------------------------------------------- */
/* 0x0005: GetDeviceNameType */
/* -------------------------------------------------------------------------- */
@@ -3125,7 +3120,7 @@ static void hidpp_connect_event(struct hidpp_device *hidpp)
/* the device is already connected, we can ask for its name and
* protocol */
if (!hidpp->protocol_major) {
- ret = !hidpp_is_connected(hidpp);
+ ret = hidpp_root_get_protocol_version(hidpp);
if (ret) {
hid_err(hdev, "Can not get the protocol version.\n");
return;
@@ -3277,7 +3272,7 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
if (hidpp->quirks & HIDPP_QUIRK_UNIFYING)
hidpp_unifying_init(hidpp);
- connected = hidpp_is_connected(hidpp);
+ connected = hidpp_root_get_protocol_version(hidpp) == 0;
atomic_set(&hidpp->connected, connected);
if (!(hidpp->quirks & HIDPP_QUIRK_UNIFYING)) {
if (!connected) {