SPEC-3723: restructure meta-agl-demo
[AGL/meta-agl-demo.git] / recipes-kernel / most / files / 0010-backport-usb-setup-timer.patch
1 From 8eaec876f732c7e4b238ada5f9304c6da2380eb1 Mon Sep 17 00:00:00 2001
2 From: Andrey Shvetsov <andrey.shvetsov@k2l.de>
3 Date: Fri, 8 Feb 2019 22:44:32 +0000
4 Subject: [PATCH] backport: usb: setup_timer
5
6 ---
7  driver/hdm-usb/hdm_usb.c | 7 +++----
8  1 file changed, 3 insertions(+), 4 deletions(-)
9
10 diff --git a/hdm-usb/hdm_usb.c b/hdm-usb/hdm_usb.c
11 index 5b0af88..9896835 100644
12 --- a/hdm-usb/hdm_usb.c
13 +++ b/hdm-usb/hdm_usb.c
14 @@ -760,9 +760,9 @@ static void hdm_request_netinfo(struct most_interface *iface, int channel,
15   * The handler runs in interrupt context. That's why we need to defer the
16   * tasks to a work queue.
17   */
18 -static void link_stat_timer_handler(unsigned long data)
19 +static void link_stat_timer_handler(struct timer_list *t)
20  {
21 -       struct most_dev *mdev = (struct most_dev *)data;
22 +       struct most_dev *mdev = from_timer(mdev, t, link_stat_timer);
23  
24         schedule_work(&mdev->poll_work_obj);
25         mdev->link_stat_timer.expires = jiffies + (2 * HZ);
26 @@ -1154,8 +1154,7 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id)
27         num_endpoints = usb_iface_desc->desc.bNumEndpoints;
28         mutex_init(&mdev->io_mutex);
29         INIT_WORK(&mdev->poll_work_obj, wq_netinfo);
30 -       setup_timer(&mdev->link_stat_timer, link_stat_timer_handler,
31 -                   (unsigned long)mdev);
32 +       timer_setup(&mdev->link_stat_timer, link_stat_timer_handler, 0);
33  
34         mdev->usb_device = usb_dev;
35         mdev->link_stat_timer.expires = jiffies + (2 * HZ);