Skip to content

Commit e9aabc9

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

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
@@ -258,6 +258,11 @@ impl<T: Operations> RtKit<T> {
258258
bindings::apple_rtkit_send_message(self.rtk, endpoint, message, ptr::null_mut(), false)
259259
})
260260
}
261+
262+
/// Checks if an endpoint is present
263+
pub fn has_endpoint(&self, endpoint: u8) -> bool {
264+
unsafe { bindings::apple_rtkit_has_endpoint(self.rtk, endpoint) }
265+
}
261266
}
262267

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

0 commit comments

Comments
 (0)