From 40fe1b0eac605be6871dd778a4263a5af233d3eb Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Tue, 20 Oct 2015 17:56:58 -0400 Subject: [PATCH] hidpp10: remove hidpp10_device_new_from_wpid hidpp10_device_new_from_wpid() can not work anymore given that we are not talking to the receiver anymore, but directly to the device. The proof being that .wpid is never set in struct hidpp10_device. Signed-off-by: Benjamin Tissoires --- src/hidpp10.c | 20 -------------------- src/hidpp10.h | 4 ---- 2 files changed, 24 deletions(-) diff --git a/src/hidpp10.c b/src/hidpp10.c index ce4ccd3c..ef6efcce 100644 --- a/src/hidpp10.c +++ b/src/hidpp10.c @@ -1238,26 +1238,6 @@ hidpp10_device_new(const struct hidpp_device *base, return dev; } -struct hidpp10_device* -hidpp10_device_new_from_wpid(const struct hidpp_device *base, uint16_t wpid) -{ - struct hidpp10_device *dev; - int i; - - for (i = 1; i < 7; i++) { - dev = hidpp10_device_new_from_idx(base, i); - if (!dev) - continue; - - if (dev->wpid == wpid) - return dev; - - hidpp10_device_destroy(dev); - } - - return NULL; -} - struct hidpp10_device* hidpp10_device_new_from_idx(const struct hidpp_device *base, int idx) { diff --git a/src/hidpp10.h b/src/hidpp10.h index f6980f37..332162a9 100644 --- a/src/hidpp10.h +++ b/src/hidpp10.h @@ -43,12 +43,8 @@ struct hidpp10_device { struct hidpp_device base; unsigned index; - uint16_t wpid; }; -struct hidpp10_device* -hidpp10_device_new_from_wpid(const struct hidpp_device *base, - uint16_t wpid); struct hidpp10_device* hidpp10_device_new_from_idx(const struct hidpp_device *base, int idx);