diff --git a/rust/kernel/usb.rs b/rust/kernel/usb.rs index 92215fdc3c6a..534e3ded5442 100644 --- a/rust/kernel/usb.rs +++ b/rust/kernel/usb.rs @@ -89,7 +89,7 @@ extern "C" fn disconnect_callback(intf: *mut bindings::usb_interface) { // and stored a `Pin>`. let data = unsafe { dev.drvdata_obtain::() }; - T::disconnect(intf, data.data()); + T::disconnect(intf, data.as_ref()); } }