Accepting request 835951 from network:time

- add patch pcfclock-linux-5.8.patch to fix build with current
  kernel (forwarded request 835950 from oertel)

OBS-URL: https://build.opensuse.org/request/show/835951
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pcfclock?expand=0&rev=25
This commit is contained in:
Dominique Leuenberger 2020-09-22 19:13:05 +00:00 committed by Git OBS Bridge
commit c3f8a4f88c
3 changed files with 35 additions and 3 deletions

24
pcfclock-linux-5.8.patch Normal file
View File

@ -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;

View File

@ -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

View File

@ -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} \