qcom-adc: update driver to new timer interface
Signed-off-by: Ravineet Singh <ravineet.a.singh@est.tech>
Change-Id: I174b6a5f549636c1ccb8dfe11dacd6ed6c3df6f0
diff --git a/qcom-adc/ads7924-driver.c b/qcom-adc/ads7924-driver.c
index c62199a..7e0b036 100644
--- a/qcom-adc/ads7924-driver.c
+++ b/qcom-adc/ads7924-driver.c
@@ -63,9 +63,9 @@
};
-void ads7924_timer_irq(unsigned long arg)
+void ads7924_timer_irq(struct timer_list *timer)
{
- struct ads7924_data *data = (struct ads7924_data *)arg;
+ struct ads7924_data *data = from_timer(data, timer, sample_timer);
if (data->enabled) {
mod_timer(&data->sample_timer, jiffies + msecs_to_jiffies(data->update_interval));
@@ -366,7 +366,7 @@
dev_err(&client->dev, "Failed to register with hwmon, error=%d\n", err);
goto err_remove;
}
- setup_timer(&data->sample_timer, ads7924_timer_irq, (unsigned long) data);
+ timer_setup(&data->sample_timer, ads7924_timer_irq, 0);
return 0;