Skip to content

Commit 6e085aa

Browse files
committed
rust: iio: common: aop: Add TODO fn/struct docs
Silences rust warnings. Signed-off-by: Janne Grunau <[email protected]>
1 parent 0bdb3e1 commit 6e085aa

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rust/kernel/iio/common/aop_sensors.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ use kernel::{
1717
ThisModule,
1818
};
1919

20+
/// TODO: add documentation
2021
pub trait MessageProcessor {
22+
/// TODO: add documentation
2123
fn process(&self, message: &[u8]) -> u32;
2224
}
2325

26+
/// TODO: add documentation
2427
pub struct AopSensorData<T: MessageProcessor> {
2528
dev: ARef<device::Device>,
2629
ty: u32,
@@ -29,7 +32,8 @@ pub struct AopSensorData<T: MessageProcessor> {
2932
}
3033

3134
impl<T: MessageProcessor> AopSensorData<T> {
32-
pub fn new(dev: platform::Device, ty: u32, msg_proc: T) -> Result<Arc<AopSensorData<T>>> {
35+
/// TODO: add documentation
36+
pub fn new(dev: ARef<device::Device>, ty: u32, msg_proc: T) -> Result<Arc<AopSensorData<T>>> {
3337
Ok(Arc::new(
3438
AopSensorData {
3539
dev,
@@ -80,6 +84,7 @@ struct IIOSpec {
8084
_p: PhantomPinned,
8185
}
8286

87+
/// TODO: add documentation
8388
pub struct IIORegistration<T: MessageProcessor + 'static> {
8489
dev: *mut bindings::iio_dev,
8590
spec: Pin<KBox<IIOSpec>>,
@@ -88,6 +93,7 @@ pub struct IIORegistration<T: MessageProcessor + 'static> {
8893
}
8994

9095
impl<T: MessageProcessor + 'static> IIORegistration<T> {
96+
/// TODO: add documentation
9197
pub fn new(
9298
data: Arc<AopSensorData<T>>,
9399
name: &'static CStr,

0 commit comments

Comments
 (0)