mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
openinput: fail probe if we can't enumerate
These functions are mandatory[1], fail to probe if they fail. [1] https://github.com/openinput-fw/openinput-protocol/tree/master/specification/device-protocol#mandatory-functions Signed-off-by: Filipe Laíns <lains@riseup.net>
This commit is contained in:
committed by
Filipe Laíns
parent
3f99446a1b
commit
230647c7f3
@@ -437,16 +437,19 @@ openinput_probe(struct ratbag_device *device)
|
||||
openinput_info_version(device);
|
||||
|
||||
ret = openinput_info_fw_info(device, OI_FUNCTION_FW_INFO_VENDOR, str, sizeof(str));
|
||||
if (!ret)
|
||||
log_info(device->ratbag, "openinput: firmware vendor: %s\n", str);
|
||||
if (ret)
|
||||
return ret;
|
||||
log_info(device->ratbag, "openinput: firmware vendor: %s\n", str);
|
||||
|
||||
ret = openinput_info_fw_info(device, OI_FUNCTION_FW_INFO_VERSION, str, sizeof(str));
|
||||
if (!ret)
|
||||
log_info(device->ratbag, "openinput: firmware version: %s\n", str);
|
||||
if (ret)
|
||||
return ret;
|
||||
log_info(device->ratbag, "openinput: firmware version: %s\n", str);
|
||||
|
||||
ret = openinput_info_fw_info(device, OI_FUNCTION_FW_INFO_DEVICE_NAME, str, sizeof(str));
|
||||
if (!ret)
|
||||
log_info(device->ratbag, "openinput: device: %s\n", str);
|
||||
if (ret)
|
||||
return ret;
|
||||
log_info(device->ratbag, "openinput: device: %s\n", str);
|
||||
|
||||
ret = openinput_read_supported_function_pages(device);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user