gpio: drop no-longer required unsafe Send/Sync impls

With the refactoring before this commit, `PhysDevice` is `Sync` and
`Send` automatically. So let's drop the unsafe impls to prevent future
type changes to result in unsound behaviour (again).

Fixes: #442
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
This commit is contained in:
Erik Schilling 2023-09-28 12:15:37 +02:00 committed by Viresh Kumar
parent 2e4a344c8e
commit 25cba8ea70

View File

@ -96,13 +96,6 @@ pub(crate) struct PhysDevice {
state: Vec<Mutex<PhysLineState>>,
}
// SAFETY: Safe as the structure can be sent to another thread.
unsafe impl Send for PhysDevice {}
// SAFETY: Safe as the structure can be shared with another thread as the state
// is protected with a lock.
unsafe impl Sync for PhysDevice {}
impl GpioDevice for PhysDevice {
fn open(device: u32) -> Result<Self>
where