diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-24 03:08:09 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-01 16:57:23 +0100 |
commit | 7e33da59a6a60c7ba486b01b121b683ada3a50bc (patch) | |
tree | 604cc2f3076d7b6461d4e6439db3d2845fa06b06 /drivers/usb/isp1760/isp1760-hcd.c | |
parent | usb: usbip: Convert timers to use timer_setup() (diff) | |
download | linux-dev-7e33da59a6a60c7ba486b01b121b683ada3a50bc.tar.xz linux-dev-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 'drivers/usb/isp1760/isp1760-hcd.c')
-rw-r--r-- | drivers/usb/isp1760/isp1760-hcd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/isp1760/isp1760-hcd.c b/drivers/usb/isp1760/isp1760-hcd.c index 8e59e0c02b8a..2b67eb889d41 100644 --- a/drivers/usb/isp1760/isp1760-hcd.c +++ b/drivers/usb/isp1760/isp1760-hcd.c @@ -1258,10 +1258,11 @@ leave: #define SLOT_TIMEOUT 300 #define SLOT_CHECK_PERIOD 200 static struct timer_list errata2_timer; +static struct usb_hcd *errata2_timer_hcd; -static void errata2_function(unsigned long data) +static void errata2_function(struct timer_list *unused) { - struct usb_hcd *hcd = (struct usb_hcd *) data; + struct usb_hcd *hcd = errata2_timer_hcd; struct isp1760_hcd *priv = hcd_to_priv(hcd); int slot; struct ptd ptd; @@ -1333,7 +1334,8 @@ static int isp1760_run(struct usb_hcd *hcd) if (retval) return retval; - setup_timer(&errata2_timer, errata2_function, (unsigned long)hcd); + errata2_timer_hcd = hcd; + timer_setup(&errata2_timer, errata2_function, 0); errata2_timer.expires = jiffies + msecs_to_jiffies(SLOT_CHECK_PERIOD); add_timer(&errata2_timer); |