Skip to content

Commit dc8cab3

Browse files
WhatAmISupposedToPutHerejannau
authored andcommitted
rust: soc: apple: rtkit: Add apple_rtkit_has_endpoint
Signed-off-by: Janne Grunau <j@jannau.net>
1 parent a2dc626 commit dc8cab3

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

rust/kernel/soc/apple/rtkit.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,11 @@ impl<T: Operations> RtKit<T> {
267267
bindings::apple_rtkit_send_message(self.rtk, endpoint, message, ptr::null_mut(), false)
268268
})
269269
}
270+
271+
/// Checks if an endpoint is present
272+
pub fn has_endpoint(self: Pin<&mut Self>, endpoint: u8) -> bool {
273+
unsafe { bindings::apple_rtkit_has_endpoint(self.rtk, endpoint) }
274+
}
270275
}
271276

272277
// SAFETY: `RtKit` operations require a mutable reference

0 commit comments

Comments
 (0)