Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
felfert committed Apr 17, 2023
1 parent f262966 commit 864909f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions cherryrgb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,9 @@ impl CherryKeyboard {

// Skip kernel driver detachment for non-unix platforms
if cfg!(unix) {
let kernel_driver_active = device_handle
.kernel_driver_active(INTERFACE_NUM)
.context("kernel_driver_active")?;

if kernel_driver_active {
device_handle
.detach_kernel_driver(INTERFACE_NUM)
.context("Failed to detach active kernel driver")?;
}
device_handle
.set_auto_detach_kernel_driver(true)
.context("Failed to detach active kernel driver")?;
}

device_handle
Expand Down

0 comments on commit 864909f

Please sign in to comment.