* [PATCH 1/2] sh: push-switch: use setup_timer() helper.
@ 2017-09-22 11:56 Allen Pais
0 siblings, 0 replies; only message in thread
From: Allen Pais @ 2017-09-22 11:56 UTC (permalink / raw)
To: linux-sh
Use setup_timer function instead of initializing timer with the
function and data fields.
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
arch/sh/drivers/push-switch.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c
index 5bfb341..8e02851 100644
--- a/arch/sh/drivers/push-switch.c
+++ b/arch/sh/drivers/push-switch.c
@@ -78,11 +78,8 @@ static int switch_drv_probe(struct platform_device *pdev)
}
INIT_WORK(&psw->work, switch_work_handler);
- init_timer(&psw->debounce);
-
- psw->debounce.function = switch_timer;
- psw->debounce.data = (unsigned long)psw;
+ setup_timer(&psw->debounce, switch_timer, (unsigned long)psw);
/* Workqueue API brain-damage */
psw->pdev = pdev;
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-09-22 11:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 11:56 [PATCH 1/2] sh: push-switch: use setup_timer() helper Allen Pais
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.