[PATCH v6 4/7] iio: ssp_sensors: drop duplicated wdt timer and work cleanup
From: Sanjay Chitroda
Date: Wed Apr 15 2026 - 01:10:06 EST
From: Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx>
The SSP remove path cleans up the watchdog timer and associated work
both via ssp_disable_wdt_timer() and through explicit timer and work
teardown.
Remove the duplicated timer_delete_sync() and cancel_work_sync()
calls and rely on ssp_disable_wdt_timer() as the single cleanup helper
to simplify the remove path.
No functional change intended.
Signed-off-by: Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx>
---
drivers/iio/common/ssp_sensors/ssp_dev.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/iio/common/ssp_sensors/ssp_dev.c b/drivers/iio/common/ssp_sensors/ssp_dev.c
index da09c9f3ceb6..cb4c26a6b76c 100644
--- a/drivers/iio/common/ssp_sensors/ssp_dev.c
+++ b/drivers/iio/common/ssp_sensors/ssp_dev.c
@@ -585,14 +585,11 @@ static void ssp_remove(struct spi_device *spi)
"SSP_MSG2SSP_AP_STATUS_SHUTDOWN failed\n");
ssp_enable_mcu(data, false);
- ssp_disable_wdt_timer(data);
-
ssp_clean_pending_list(data);
free_irq(data->spi->irq, data);
- timer_delete_sync(&data->wdt_timer);
- cancel_work_sync(&data->work_wdt);
+ ssp_disable_wdt_timer(data);
mutex_destroy(&data->comm_lock);
mutex_destroy(&data->pending_lock);
--
2.34.1