diff --git a/pcfclock-linux-5.8.patch b/pcfclock-linux-5.8.patch new file mode 100644 index 0000000..975bf55 --- /dev/null +++ b/pcfclock-linux-5.8.patch @@ -0,0 +1,24 @@ +--- linux/pcfclock.c 2020/09/21 23:17:26 1.1 ++++ linux/pcfclock.c 2020/09/21 23:34:20 +@@ -445,8 +445,21 @@ + char name[8]; + #endif + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) + pcfclock_table[n].dev = + parport_register_device(port, "pcfclock", NULL, NULL, NULL, 0, NULL); ++#else ++ struct pardev_cb pdev_cb = { ++ .preempt = NULL, ++ .wakeup = NULL, ++ .private = NULL, ++ .irq_func = NULL, ++ .flags = 0, ++ }; ++ ++ pcfclock_table[n].dev = ++ parport_register_dev_model(port, "pcfclock", &pdev_cb, n); ++#endif + if (pcfclock_table[n].dev == NULL) + return 1; + diff --git a/pcfclock.changes b/pcfclock.changes index 7716452..d22d9f9 100644 --- a/pcfclock.changes +++ b/pcfclock.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Sep 22 01:21:38 CEST 2020 - ro@suse.de + +- add patch pcfclock-linux-5.8.patch to fix build with current + kernel + ------------------------------------------------------------------- Tue Jun 19 12:11:47 UTC 2018 - msuchanek@suse.com diff --git a/pcfclock.spec b/pcfclock.spec index 95564e4..1371226 100644 --- a/pcfclock.spec +++ b/pcfclock.spec @@ -1,7 +1,7 @@ # # spec file for package pcfclock # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -22,7 +22,7 @@ Release: 0 Summary: Pcfclock kernel driver License: GPL-2.0-or-later Group: System/Kernel -Url: http://www-stud.ims.uni-stuttgart.de/~voegelas/pcf.html +URL: http://www-stud.ims.uni-stuttgart.de/~voegelas/pcf.html Source: pcfclock-%{version}.tar.gz Source1: Makefile Source2: preamble @@ -33,6 +33,7 @@ Patch2: pcfclock-no_devfs.patch Patch3: pcfclock-include.patch Patch4: pcfclock-linux-3.19.patch Patch5: pcfclock-linux-4.12.patch +Patch6: pcfclock-linux-5.8.patch BuildRequires: kernel-source BuildRequires: kernel-syms BuildRequires: libelf-devel @@ -74,6 +75,7 @@ more than 1500 kilometers. %patch3 %patch4 %patch5 +%patch6 mkdir source mkdir obj cp -a linux/pcfclock.c %{SOURCE1} \