diff -Nru v4l2loopback-0.9.1/debian/changelog v4l2loopback-0.9.1/debian/changelog --- v4l2loopback-0.9.1/debian/changelog 2015-10-27 19:47:27.000000000 +0000 +++ v4l2loopback-0.9.1/debian/changelog 2018-07-06 22:46:49.000000000 +0000 @@ -1,3 +1,10 @@ +v4l2loopback (0.9.1-4ubuntu0.1) xenial; urgency=medium + + * Add support for Linux kernel 4.15 (LP: #1777913): + - debian/patches/adapt-to-new-kernel-timer-api.patch + + -- Marcelo Henrique Cerri Wed, 20 Jun 2018 15:31:36 -0300 + v4l2loopback (0.9.1-4) unstable; urgency=medium * Sort output in generated tarball. diff -Nru v4l2loopback-0.9.1/debian/control v4l2loopback-0.9.1/debian/control --- v4l2loopback-0.9.1/debian/control 2015-10-27 19:45:09.000000000 +0000 +++ v4l2loopback-0.9.1/debian/control 2018-07-06 22:22:35.000000000 +0000 @@ -1,7 +1,8 @@ Source: v4l2loopback Section: kernel Priority: optional -Maintainer: IOhannes m zmölnig (Debian/GNU) +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: IOhannes m zmölnig (Debian/GNU) Build-Depends: cdbs, debhelper, dh-buildinfo, diff -Nru v4l2loopback-0.9.1/debian/control.in v4l2loopback-0.9.1/debian/control.in --- v4l2loopback-0.9.1/debian/control.in 2015-10-27 19:32:31.000000000 +0000 +++ v4l2loopback-0.9.1/debian/control.in 2018-07-06 22:22:35.000000000 +0000 @@ -1,7 +1,8 @@ Source: v4l2loopback Section: kernel Priority: optional -Maintainer: IOhannes m zmölnig (Debian/GNU) +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: IOhannes m zmölnig (Debian/GNU) Build-Depends: @cdbs@, dkms, tar (>= 1.28), diff -Nru v4l2loopback-0.9.1/debian/patches/adapt-to-new-kernel-timer-api.patch v4l2loopback-0.9.1/debian/patches/adapt-to-new-kernel-timer-api.patch --- v4l2loopback-0.9.1/debian/patches/adapt-to-new-kernel-timer-api.patch 1970-01-01 00:00:00.000000000 +0000 +++ v4l2loopback-0.9.1/debian/patches/adapt-to-new-kernel-timer-api.patch 2018-07-06 22:22:27.000000000 +0000 @@ -0,0 +1,81 @@ +From 00eb0df20248d7a37594905d64030d0bd0b72eb8 Mon Sep 17 00:00:00 2001 +From: Nick Sarnie +Date: Sun, 28 Jan 2018 21:59:18 -0500 +Subject: [PATCH] Adapt to new kernel timer API + +Based on: https://dpdk.org/dev/patchwork/patch/31739/ + +Signed-off-by: Nick Sarnie +--- + v4l2loopback.c | 31 ++++++++++++++++++++++++++----- + 1 file changed, 26 insertions(+), 5 deletions(-) + +--- a/v4l2loopback.c ++++ b/v4l2loopback.c +@@ -36,6 +36,10 @@ + # define kstrtoul strict_strtoul + #endif + ++#if defined(timer_setup) && defined(from_timer) ++#define HAVE_TIMER_SETUP ++#endif ++ + #define V4L2LOOPBACK_VERSION_CODE KERNEL_VERSION(0, 9, 1) + + MODULE_DESCRIPTION("V4L2 loopback video device"); +@@ -2095,11 +2099,17 @@ + if (dev->sustain_framerate && !timer_pending(&dev->sustain_timer)) + mod_timer(&dev->sustain_timer, jiffies + dev->frame_jiffies * 3 / 2); + } +- ++#ifdef HAVE_TIMER_SETUP ++static void sustain_timer_clb(struct timer_list *t) ++#else + static void sustain_timer_clb(unsigned long nr) ++#endif + { ++#ifdef HAVE_TIMER_SETUP ++ struct v4l2_loopback_device *dev = from_timer(dev,t,sustain_timer); ++#else + struct v4l2_loopback_device *dev = devs[nr]; +- ++#endif + spin_lock(&dev->lock); + if (dev->sustain_framerate) { + dev->reread_count++; +@@ -2112,11 +2122,17 @@ + } + spin_unlock(&dev->lock); + } +- ++#ifdef HAVE_TIMER_SETUP ++static void timeout_timer_clb(struct timer_list *t) ++#else + static void timeout_timer_clb(unsigned long nr) ++#endif + { ++#ifdef HAVE_TIMER_SETUP ++ struct v4l2_loopback_device *dev = from_timer(dev,t,timeout_timer); ++#else + struct v4l2_loopback_device *dev = devs[nr]; +- ++#endif + spin_lock(&dev->lock); + if (dev->timeout_jiffies > 0) { + dev->timeout_happened = 1; +@@ -2178,9 +2194,14 @@ + dev->buffer_size = 0; + dev->image = NULL; + dev->imagesize = 0; ++#ifdef HAVE_TIMER_SETUP ++ timer_setup(&dev->sustain_timer, sustain_timer_clb, 0); ++ timer_setup(&dev->timeout_timer, timeout_timer_clb, 0); ++#else + setup_timer(&dev->sustain_timer, sustain_timer_clb, nr); +- dev->reread_count = 0; + setup_timer(&dev->timeout_timer, timeout_timer_clb, nr); ++#endif ++ dev->reread_count = 0; + dev->timeout_jiffies = 0; + dev->timeout_image = NULL; + dev->timeout_happened = 0; diff -Nru v4l2loopback-0.9.1/debian/patches/series v4l2loopback-0.9.1/debian/patches/series --- v4l2loopback-0.9.1/debian/patches/series 2015-10-01 18:57:03.000000000 +0000 +++ v4l2loopback-0.9.1/debian/patches/series 2018-07-06 22:22:27.000000000 +0000 @@ -1 +1,2 @@ gstreamer1.patch +adapt-to-new-kernel-timer-api.patch