diff options
author | Tony Lindgren <tony@atomide.com> | 2017-11-28 17:12:32 +0100 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2017-11-28 17:12:32 +0100 |
commit | bc686442f8a601bccac1f22506ecdb4b0d62cadd (patch) | |
tree | b224ab4aa2350b233da640f5850f48bc6bfeb2d0 /arch/sh/drivers/push-switch.c | |
parent | ARM: dts: Add remote-wakeup-connected for omap OHCI (diff) | |
parent | ARM: dts: am437x-cm-t43: Correct the dmas property of spi0 (diff) | |
download | linux-bc686442f8a601bccac1f22506ecdb4b0d62cadd.tar.xz linux-bc686442f8a601bccac1f22506ecdb4b0d62cadd.zip |
Merge branch 'dts-fixes' into omap-for-v4.15/fixes-dt
Diffstat (limited to 'arch/sh/drivers/push-switch.c')
-rw-r--r-- | arch/sh/drivers/push-switch.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c index 5bfb341cc5c4..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,10 +78,7 @@ 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; + timer_setup(&psw->debounce, switch_timer, 0); /* Workqueue API brain-damage */ psw->pdev = pdev; |