Hello community,

here is the log from the commit of package hdjmod for openSUSE:Factory checked 
in at 2018-02-13 10:31:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hdjmod (Old)
 and      /work/SRC/openSUSE:Factory/.hdjmod.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hdjmod"

Tue Feb 13 10:31:50 2018 rev:18 rq:575867 version:1.28

Changes:
--------
--- /work/SRC/openSUSE:Factory/hdjmod/hdjmod.changes    2017-11-27 
22:17:52.683795578 +0100
+++ /work/SRC/openSUSE:Factory/.hdjmod.new/hdjmod.changes       2018-02-13 
10:31:53.671707999 +0100
@@ -1,0 +2,8 @@
+Fri Feb 10 15:00:06 UTC 2018 - ma...@marix.org
+
+- Added hdjmod_kernel_4.15.patch: Fixes build on Kernel 4.15 and
+  up.
+- Removed accidentally added backup file from
+  hdjmod_fix_hotplug.patch
+
+-------------------------------------------------------------------

New:
----
  hdjmod_kernel_4.15.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ hdjmod.spec ++++++
--- /var/tmp/diff_new_pack.OM0n5P/_old  2018-02-13 10:31:55.295649485 +0100
+++ /var/tmp/diff_new_pack.OM0n5P/_new  2018-02-13 10:31:55.299649340 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package hdjmod
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2008-2017 Matthias Bach <ma...@marix.org>
 #
 # All modifications and additions to the file contributed by third parties
@@ -58,6 +58,8 @@
 Patch10:        hdjmod_fix_buffer_overrun_in_device_name_handling.patch
 # PATCH-FIX-UPSTREAM hdjmod_kernel_4.14.patch ma...@marix.org -- Fix build on 
kernel 4.14 and newer
 Patch11:        hdjmod_kernel_4.14.patch
+# PATCH-FIX-UPSTREAM hdjmod_kernel_4.15.patch ma...@marix.org -- Fix build on 
kernel 4.15 and newer
+Patch12:        hdjmod_kernel_4.15.patch
 
 %suse_kernel_module_package -p%_sourcedir/preamble
 
@@ -83,6 +85,7 @@
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
+%patch12 -p1
 set -- *
 mkdir source
 mv "$@" source/

++++++ hdjmod_fix_hotplug.patch ++++++
++++ 2811 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/hdjmod/hdjmod_fix_hotplug.patch
++++ and /work/SRC/openSUSE:Factory/.hdjmod.new/hdjmod_fix_hotplug.patch

++++++ hdjmod_kernel_4.15.patch ++++++
From: Matthias Bach <ma...@marix.org>
Date: 2018-02-10 15:00:00 +0100
Subject: Fix compile on kernel 4.15
Upstream: to be done

The module no longer compiled on 4.15

diff -Naru hdjmod-1.28o/device.c hdjmod-1.28/device.c
--- hdjmod-1.28o/device.c       2009-01-27 15:25:50.000000000 +0100
+++ hdjmod-1.28/device.c        2018-02-10 13:24:32.903039377 +0100
@@ -2373,7 +2373,11 @@
 {
        int rc=-ENODEV;
        u16     devstatus;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
+       rc = usb_get_std_status(chip->dev, USB_RECIP_DEVICE, 0, &devstatus);
+#else
        rc = usb_get_status(chip->dev, USB_RECIP_DEVICE, 0, &devstatus);
+#endif
        if (rc >= 0) {
                          rc = (rc > 0 ? 0 : -ENODEV);
        }
diff -Naru hdjmod-1.28o/midi.c hdjmod-1.28/midi.c
--- hdjmod-1.28o/midi.c 2009-01-27 15:25:50.000000000 +0100
+++ hdjmod-1.28/midi.c  2018-02-10 14:19:57.548542925 +0100
@@ -49,6 +49,9 @@
 #ifdef CONFIG_COMPAT
 #include <linux/compat.h>
 #endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
+#include <linux/timer.h>
+#endif
 #include "djdevioctls.h"
 #include "device.h"
 #include "bulk.h"
@@ -327,9 +330,16 @@
 }
 
 /* called after transfers had been interrupted due to some USB error */
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
+static void snd_hdjmidi_error_timer(struct timer_list *t)
+{
+       struct snd_hdjmidi *umidi = from_timer(umidi, t, error_timer);
+#else
 static void snd_hdjmidi_error_timer(unsigned long data)
 {
        struct snd_hdjmidi *umidi = (struct snd_hdjmidi *)data;
+#endif
        int i;
        
        for (i = 0; i < MIDI_MAX_ENDPOINTS; ++i) {
@@ -887,10 +897,14 @@
        spin_lock_init(&ep->buffer_lock);
        snd_hdjmidi_output_initialize_tasklet(ep);
 #ifdef THROTTLE_MP3_RENDER
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
+       timer_setup(&ep->render_delay_timer, midi_render_throttle_timer, 0);
+#else
        init_timer(&ep->render_delay_timer);
        ep->render_delay_timer.data = (unsigned long)ep;
        ep->render_delay_timer.function = midi_render_throttle_timer;
-#endif
+#endif /* LINUX_VERSION_CODE */
+#endif /* THROTTLE_MP3_RENDER */
 
        for (i = 0; i < 0x10; ++i)
                if (ep_info->out_ep) {
@@ -2479,10 +2493,14 @@
                umidi->usb_protocol_ops = &snd_hdjmidi_standard_ops;
        }
        
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
+       timer_setup(&umidi->error_timer, snd_hdjmidi_error_timer, 0);
+#else
        init_timer(&umidi->error_timer);
 
        umidi->error_timer.function = snd_hdjmidi_error_timer;
        umidi->error_timer.data = (unsigned long)umidi;
+#endif
 
        /* detect the endpoint(s) to use */
        memset(endpoints, 0, sizeof(endpoints));
diff -Naru hdjmod-1.28o/midirender.c hdjmod-1.28/midirender.c
--- hdjmod-1.28o/midirender.c   2009-01-27 15:25:50.000000000 +0100
+++ hdjmod-1.28/midirender.c    2018-02-10 14:18:03.578774143 +0100
@@ -33,6 +33,9 @@
 #include <linux/usb.h>
 #include <asm/atomic.h>
 #include <linux/kthread.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
+#include <linux/timer.h>
+#endif
 #if ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,24) )
 #include <sound/driver.h>
 #endif
@@ -597,12 +600,18 @@
 }
 
 #ifdef THROTTLE_MP3_RENDER
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
+void midi_render_throttle_timer(struct timer_list *t)
+{
+       struct snd_hdjmidi_out_endpoint* ep = from_timer(ep, t, 
render_delay_timer);
+#else
 void midi_render_throttle_timer(unsigned long data)
 {
        struct snd_hdjmidi_out_endpoint* ep = (struct 
snd_hdjmidi_out_endpoint*)data;
+#endif /* LINUX_VERSION_CODE */
        snd_hdjmidi_do_output(ep);
 }
-#endif
+#endif /* THROTTLE_MP3_RENDER */
 
 /*
  * This is called when some data should be transferred to the device
diff -Naru hdjmod-1.28o/midirender.h hdjmod-1.28/midirender.h
--- hdjmod-1.28o/midirender.h   2009-01-27 15:25:50.000000000 +0100
+++ hdjmod-1.28/midirender.h    2018-02-10 13:53:02.900774283 +0100
@@ -88,8 +88,12 @@
 
 u8 mp3w_check_led_state(struct snd_hdjmidi_out_endpoint* ep, u8 
called_from_kthread);
 #ifdef THROTTLE_MP3_RENDER
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
+void midi_render_throttle_timer(struct timer_list *t);
+#else
 void midi_render_throttle_timer(unsigned long data);
-#endif
+#endif /* LINUX_VERSION_CODE */
+#endif /* THROTTLE_MPĀ§_RENDER */
 void snd_hdjmidi_do_output(struct snd_hdjmidi_out_endpoint* ep);
 void snd_hdjmidi_out_tasklet(unsigned long data);
 void snd_hdjmidi_output_kill_tasklet(struct snd_hdjmidi_out_endpoint* ep);

Reply via email to