summaryrefslogtreecommitdiff
path: root/arch/sh/drivers/push-switch.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/drivers/push-switch.c')
-rw-r--r--arch/sh/drivers/push-switch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c
index 2dc791507968..a17181160233 100644
--- a/arch/sh/drivers/push-switch.c
+++ b/arch/sh/drivers/push-switch.c
@@ -26,9 +26,9 @@ static ssize_t switch_show(struct device *dev,
}
static DEVICE_ATTR(switch, S_IRUGO, switch_show, NULL);
-static void switch_timer(unsigned long data)
+static void switch_timer(struct timer_list *t)
{
- struct push_switch *psw = (struct push_switch *)data;
+ struct push_switch *psw = from_timer(psw, t, debounce);
schedule_work(&psw->work);
}
@@ -78,7 +78,7 @@ static int switch_drv_probe(struct platform_device *pdev)
}
INIT_WORK(&psw->work, switch_work_handler);
- setup_timer(&psw->debounce, switch_timer, (unsigned long)psw);
+ timer_setup(&psw->debounce, switch_timer, 0);
/* Workqueue API brain-damage */
psw->pdev = pdev;