diff options
Diffstat (limited to 'drivers/usb/musb/blackfin.c')
-rw-r--r-- | drivers/usb/musb/blackfin.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index 4418574a36a1..0a98dcd66d19 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c @@ -1,11 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * MUSB OTG controller driver for Blackfin Processors * * Copyright 2006-2008 Analog Devices Inc. * * Enter bugs at http://blackfin.uclinux.org/ - * - * Licensed under the GPL-2 or later. */ #include <linux/module.h> @@ -223,7 +222,7 @@ static irqreturn_t blackfin_interrupt(int irq, void *__hci) if ((musb->xceiv->otg->state == OTG_STATE_B_IDLE || musb->xceiv->otg->state == OTG_STATE_A_WAIT_BCON) || (musb->int_usb & MUSB_INTR_DISCONNECT && is_host_active(musb))) { - mod_timer(&musb_conn_timer, jiffies + TIMER_DELAY); + mod_timer(&musb->dev_timer, jiffies + TIMER_DELAY); musb->a_wait_bcon = TIMER_DELAY; } @@ -232,9 +231,9 @@ static irqreturn_t blackfin_interrupt(int irq, void *__hci) return retval; } -static void musb_conn_timer_handler(unsigned long _musb) +static void musb_conn_timer_handler(struct timer_list *t) { - struct musb *musb = (void *)_musb; + struct musb *musb = from_timer(musb, t, dev_timer); unsigned long flags; u16 val; static u8 toggle; @@ -266,7 +265,7 @@ static void musb_conn_timer_handler(unsigned long _musb) musb_writeb(musb->mregs, MUSB_INTRUSB, val); musb->xceiv->otg->state = OTG_STATE_B_IDLE; } - mod_timer(&musb_conn_timer, jiffies + TIMER_DELAY); + mod_timer(&musb->dev_timer, jiffies + TIMER_DELAY); break; case OTG_STATE_B_IDLE: /* @@ -310,7 +309,7 @@ static void musb_conn_timer_handler(unsigned long _musb) * shortening it, if accelerating A-plug detection * is needed in OTG mode. */ - mod_timer(&musb_conn_timer, jiffies + TIMER_DELAY / 4); + mod_timer(&musb->dev_timer, jiffies + TIMER_DELAY / 4); } break; default: @@ -445,8 +444,7 @@ static int bfin_musb_init(struct musb *musb) bfin_musb_reg_init(musb); - setup_timer(&musb_conn_timer, musb_conn_timer_handler, - (unsigned long) musb); + timer_setup(&musb->dev_timer, musb_conn_timer_handler, 0); musb->xceiv->set_power = bfin_musb_set_power; |