Skip to content

Commit 63f4c0d

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

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

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

0 commit comments

Comments
 (0)