mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
staging: most: hdm-usb: Use setup_timer
Use the timer API function setup_timer instead of init_timer, removing the structure field assignments. <smpl> @timer@ expression e1,e2,e3,fn_ptr; @@ -init_timer(&e1); +setup_timer(&e1, fn_ptr, e2); ... when != fn_ptr = e3 -e1.function = fn_ptr; -e1.data = e2; </smpl> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f96d48aaa9
commit
bff1d83d78
1 changed files with 2 additions and 3 deletions
|
@ -1239,11 +1239,10 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id)
|
||||||
num_endpoints = usb_iface_desc->desc.bNumEndpoints;
|
num_endpoints = usb_iface_desc->desc.bNumEndpoints;
|
||||||
mutex_init(&mdev->io_mutex);
|
mutex_init(&mdev->io_mutex);
|
||||||
INIT_WORK(&mdev->poll_work_obj, wq_netinfo);
|
INIT_WORK(&mdev->poll_work_obj, wq_netinfo);
|
||||||
init_timer(&mdev->link_stat_timer);
|
setup_timer(&mdev->link_stat_timer, link_stat_timer_handler,
|
||||||
|
(unsigned long)mdev);
|
||||||
|
|
||||||
mdev->usb_device = usb_dev;
|
mdev->usb_device = usb_dev;
|
||||||
mdev->link_stat_timer.function = link_stat_timer_handler;
|
|
||||||
mdev->link_stat_timer.data = (unsigned long)mdev;
|
|
||||||
mdev->link_stat_timer.expires = jiffies + (2 * HZ);
|
mdev->link_stat_timer.expires = jiffies + (2 * HZ);
|
||||||
|
|
||||||
mdev->iface.mod = hdm_usb_fops.owner;
|
mdev->iface.mod = hdm_usb_fops.owner;
|
||||||
|
|
Loading…
Reference in a new issue