mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
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 <benjamin.tissoires@gmail.com>
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user