Skip to content

Commit da9cf4c

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

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rust/kernel/iio/common/aop_sensors.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ use kernel::{
1313
types::ForeignOwnable, ThisModule,
1414
};
1515

16+
/// TODO: add documentation
1617
pub trait MessageProcessor {
18+
/// TODO: add documentation
1719
fn process(&self, message: &[u8]) -> u32;
1820
}
1921

22+
/// TODO: add documentation
2023
pub struct AopSensorData<T: MessageProcessor> {
2124
dev: platform::Device,
2225
ty: u32,
@@ -25,6 +28,7 @@ pub struct AopSensorData<T: MessageProcessor> {
2528
}
2629

2730
impl<T: MessageProcessor> AopSensorData<T> {
31+
/// TODO: add documentation
2832
pub fn new(dev: platform::Device, ty: u32, msg_proc: T) -> Result<Arc<AopSensorData<T>>> {
2933
Ok(Arc::new(
3034
AopSensorData {
@@ -76,6 +80,7 @@ struct IIOSpec {
7680
_p: PhantomPinned,
7781
}
7882

83+
/// TODO: add documentation
7984
pub struct IIORegistration<T: MessageProcessor + 'static> {
8085
dev: *mut bindings::iio_dev,
8186
spec: Pin<KBox<IIOSpec>>,
@@ -84,6 +89,7 @@ pub struct IIORegistration<T: MessageProcessor + 'static> {
8489
}
8590

8691
impl<T: MessageProcessor + 'static> IIORegistration<T> {
92+
/// TODO: add documentation
8793
pub fn new(
8894
data: Arc<AopSensorData<T>>,
8995
name: &'static CStr,

0 commit comments

Comments
 (0)