mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
sinowealth: move raw data reading from init function to probe function
This commit is contained in:
committed by
Peter Hutterer
parent
b5d41e3657
commit
8c0124d654
@@ -387,6 +387,10 @@ sinowealth_init_profile(struct ratbag_device *device)
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
rc = sinowealth_read_raw_data(device);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
/* number of DPIs = all DPIs from min to max (inclusive) and "0 DPI" as a special value
|
||||
* to signal a disabled DPI step.
|
||||
*/
|
||||
@@ -469,12 +473,6 @@ sinowealth_probe(struct ratbag_device *device)
|
||||
goto err;
|
||||
}
|
||||
|
||||
rc = sinowealth_read_raw_data(device);
|
||||
if (rc) {
|
||||
rc = -ENODEV;
|
||||
goto err;
|
||||
}
|
||||
|
||||
profile = ratbag_device_get_profile(device, 0);
|
||||
rc = sinowealth_update_profile(profile);
|
||||
if (rc) {
|
||||
|
||||
Reference in New Issue
Block a user