From bff1d83d78db66d3307f856344fd2202b8b77ce3 Mon Sep 17 00:00:00 2001 From: Muhammad Falak R Wani Date: Sat, 24 Oct 2015 07:45:44 +0530 Subject: [PATCH] staging: most: hdm-usb: Use setup_timer Use the timer API function setup_timer instead of init_timer, removing the structure field assignments. @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; Signed-off-by: Muhammad Falak R Wani Signed-off-by: Greg Kroah-Hartman --- drivers/staging/most/hdm-usb/hdm_usb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c b/drivers/staging/most/hdm-usb/hdm_usb.c index b5fb1a781ae1..41690f801fb8 100644 --- a/drivers/staging/most/hdm-usb/hdm_usb.c +++ b/drivers/staging/most/hdm-usb/hdm_usb.c @@ -1239,11 +1239,10 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id) num_endpoints = usb_iface_desc->desc.bNumEndpoints; mutex_init(&mdev->io_mutex); 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->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->iface.mod = hdm_usb_fops.owner; -- 2.30.2