diff options
| author | Alice Ryhl <aliceryhl@google.com> | 2026-02-23 10:08:27 +0000 |
|---|---|---|
| committer | Miguel Ojeda <ojeda@kernel.org> | 2026-04-03 11:57:35 +0200 |
| commit | 96f4e74cab632ea5c7e7fa996a28337283ecca11 (patch) | |
| tree | 92af8d6e294b408bf3426e4f25e82a0fdcdd31a7 | |
| parent | ef90b103e8f767ffc31b1ddfef012358ea873d85 (diff) | |
| download | linux-96f4e74cab632ea5c7e7fa996a28337283ecca11.tar.gz linux-96f4e74cab632ea5c7e7fa996a28337283ecca11.zip | |
pwm: th1520: remove impl Send/Sync for Th1520PwmDriverData
Now that clk implements Send and Sync, we no longer need to manually
implement these traits for Th1520PwmDriverData. Thus remove the
implementations.
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Acked-by: Uwe Kleine-König <ukleinek@kernel.org>
Reviewed-by: Michal Wilczynski <m.wilczynski@samsung.com>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260223-clk-send-sync-v5-3-181bf2f35652@google.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
| -rw-r--r-- | drivers/pwm/pwm_th1520.rs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/pwm/pwm_th1520.rs b/drivers/pwm/pwm_th1520.rs index b0e24ee724e4..6cd6fa3d2984 100644 --- a/drivers/pwm/pwm_th1520.rs +++ b/drivers/pwm/pwm_th1520.rs @@ -99,21 +99,6 @@ struct Th1520PwmDriverData { clk: Clk, } -// This `unsafe` implementation is a temporary necessity because the underlying `kernel::clk::Clk` -// type does not yet expose `Send` and `Sync` implementations. This block should be removed -// as soon as the clock abstraction provides these guarantees directly. -// TODO: Remove those unsafe impl's when Clk will support them itself. - -// SAFETY: The `devres` framework requires the driver's private data to be `Send` and `Sync`. -// We can guarantee this because the PWM core synchronizes all callbacks, preventing concurrent -// access to the contained `iomem` and `clk` resources. -unsafe impl Send for Th1520PwmDriverData {} - -// SAFETY: The same reasoning applies as for `Send`. The PWM core's synchronization -// guarantees that it is safe for multiple threads to have shared access (`&self`) -// to the driver data during callbacks. -unsafe impl Sync for Th1520PwmDriverData {} - impl pwm::PwmOps for Th1520PwmDriverData { type WfHw = Th1520WfHw; |
