diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-24 12:08:09 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-01 16:57:23 +0100 |
commit | 7e33da59a6a60c7ba486b01b121b683ada3a50bc (patch) | |
tree | 604cc2f3076d7b6461d4e6439db3d2845fa06b06 /drivers/usb/isp1760/isp1760-udc.c | |
parent | usb: usbip: Convert timers to use timer_setup() (diff) | |
download | linux-7e33da59a6a60c7ba486b01b121b683ada3a50bc.tar.xz linux-7e33da59a6a60c7ba486b01b121b683ada3a50bc.zip |
usb: isp1760: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Cc: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Cc: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/usb/isp1760/isp1760-udc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/isp1760/isp1760-udc.c b/drivers/usb/isp1760/isp1760-udc.c index 69400f3da886..ad566f27dffe 100644 --- a/drivers/usb/isp1760/isp1760-udc.c +++ b/drivers/usb/isp1760/isp1760-udc.c @@ -1331,9 +1331,9 @@ static irqreturn_t isp1760_udc_irq(int irq, void *dev) return status ? IRQ_HANDLED : IRQ_NONE; } -static void isp1760_udc_vbus_poll(unsigned long data) +static void isp1760_udc_vbus_poll(struct timer_list *t) { - struct isp1760_udc *udc = (struct isp1760_udc *)data; + struct isp1760_udc *udc = from_timer(udc, t, vbus_timer); unsigned long flags; spin_lock_irqsave(&udc->lock, flags); @@ -1452,8 +1452,7 @@ int isp1760_udc_register(struct isp1760_device *isp, int irq, udc->regs = isp->regs; spin_lock_init(&udc->lock); - setup_timer(&udc->vbus_timer, isp1760_udc_vbus_poll, - (unsigned long)udc); + timer_setup(&udc->vbus_timer, isp1760_udc_vbus_poll, 0); ret = isp1760_udc_init(udc); if (ret < 0) |