Skip to content

Commit eb38aec

Browse files
committed
zephyr: sys: device: gpio: Allow Gpio::new to be unused
Add a `#[allow(dead_code)]` annotation to `Gpio::new`, as not all devices necessarily will have a Gpio device (or it could be disable). Signed-off-by: David Brown <[email protected]>
1 parent f04a8e0 commit eb38aec

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

zephyr/src/device/gpio.rs

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ impl Gpio {
4444
/// Constructor, used by the devicetree generated code.
4545
///
4646
/// TODO: Guarantee single instancing.
47+
#[allow(dead_code)]
4748
pub(crate) unsafe fn new(unique: &Unique, device: *const raw::device) -> Option<Gpio> {
4849
if !unique.once() {
4950
return None;

0 commit comments

Comments
 (0)