diff options
Diffstat (limited to 'drivers/usb/usbip/vudc_transfer.c')
-rw-r--r-- | drivers/usb/usbip/vudc_transfer.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/usb/usbip/vudc_transfer.c b/drivers/usb/usbip/vudc_transfer.c index 4cfd475ee865..c9db846ee4f6 100644 --- a/drivers/usb/usbip/vudc_transfer.c +++ b/drivers/usb/usbip/vudc_transfer.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2015 Karol Kosik <karo9@interia.eu> * Copyright (C) 2015-2016 Samsung Electronics @@ -6,19 +7,6 @@ * Based on dummy_hcd.c, which is: * Copyright (C) 2003 David Brownell * Copyright (C) 2003-2005 Alan Stern - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <linux/usb.h> @@ -311,9 +299,9 @@ top: return sent; } -static void v_timer(unsigned long _vudc) +static void v_timer(struct timer_list *t) { - struct vudc *udc = (struct vudc *) _vudc; + struct vudc *udc = from_timer(udc, t, tr_timer.timer); struct transfer_timer *timer = &udc->tr_timer; struct urbp *urb_p, *tmp; unsigned long flags; @@ -459,7 +447,7 @@ void v_init_timer(struct vudc *udc) { struct transfer_timer *t = &udc->tr_timer; - setup_timer(&t->timer, v_timer, (unsigned long) udc); + timer_setup(&t->timer, v_timer, 0); t->state = VUDC_TR_STOPPED; } |