* [Buildroot] [PATCH 1/1] package/dahdi-linux: Fix build on Linux 6.4
@ 2023-07-09 15:19 Bernd Kuhls
2023-07-09 16:32 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2023-07-09 15:19 UTC (permalink / raw)
To: buildroot; +Cc: Yann E . MORIN
Fixes:
http://autobuild.buildroot.net/results/8b1/8b140b7f4d2f2b3080cab90906c3cebea0e510c5/
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
.../0006-Fix-build-on-Linux-6.4.patch | 69 +++++++++++++++++++
1 file changed, 69 insertions(+)
create mode 100644 package/dahdi-linux/0006-Fix-build-on-Linux-6.4.patch
diff --git a/package/dahdi-linux/0006-Fix-build-on-Linux-6.4.patch b/package/dahdi-linux/0006-Fix-build-on-Linux-6.4.patch
new file mode 100644
index 0000000000..992cb4d513
--- /dev/null
+++ b/package/dahdi-linux/0006-Fix-build-on-Linux-6.4.patch
@@ -0,0 +1,69 @@
+From b393e59d7eb2951e2fb279fca1c4756ea165aeee Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd@kuhls.net>
+Date: Sun, 9 Jul 2023 17:14:31 +0200
+Subject: [PATCH] Fix build on Linux 6.4
+
+Needed after upstream changes in kernel 6.4:
+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/include/linux/device/class.h?id=1aaba11da9aa
+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=48380368dec14859723b9e3fbd43e042638d9a76
+
+Upstream: https://github.com/asterisk/dahdi-linux/pull/22
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ drivers/dahdi/dahdi-sysfs-chan.c | 4 ++++
+ drivers/dahdi/voicebus/voicebus.c | 4 ++++
+ drivers/dahdi/wctdm24xxp/base.c | 4 ++++
+ 3 files changed, 12 insertions(+)
+
+diff --git a/drivers/dahdi/dahdi-sysfs-chan.c b/drivers/dahdi/dahdi-sysfs-chan.c
+index a91e6ed..b18b5f9 100644
+--- a/drivers/dahdi/dahdi-sysfs-chan.c
++++ b/drivers/dahdi/dahdi-sysfs-chan.c
+@@ -482,7 +482,11 @@ int __init dahdi_sysfs_chan_init(const struct file_operations *fops)
+ }
+ should_cleanup.channel_driver = 1;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
+ dahdi_class = class_create(THIS_MODULE, "dahdi");
++#else
++ dahdi_class = class_create("dahdi");
++#endif
+ if (IS_ERR(dahdi_class)) {
+ res = PTR_ERR(dahdi_class);
+ dahdi_err("%s: class_create(dahi_chan) failed. Error: %d\n",
+diff --git a/drivers/dahdi/voicebus/voicebus.c b/drivers/dahdi/voicebus/voicebus.c
+index 8a1f7a6..d141aaf 100644
+--- a/drivers/dahdi/voicebus/voicebus.c
++++ b/drivers/dahdi/voicebus/voicebus.c
+@@ -1135,7 +1135,11 @@ static void vb_stop_txrx_processors(struct voicebus *vb)
+ */
+ void voicebus_stop(struct voicebus *vb)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
+ static DEFINE_SEMAPHORE(stop);
++#else
++ static DEFINE_SEMAPHORE(stop, 1);
++#endif
+
+ down(&stop);
+
+diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
+index a28e249..4392b45 100644
+--- a/drivers/dahdi/wctdm24xxp/base.c
++++ b/drivers/dahdi/wctdm24xxp/base.c
+@@ -224,7 +224,11 @@ mod_hooksig(struct wctdm *wc, struct wctdm_module *mod, enum dahdi_rxsig rxsig)
+ }
+
+ struct wctdm *ifaces[WC_MAX_IFACES];
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
+ DEFINE_SEMAPHORE(ifacelock);
++#else
++DEFINE_SEMAPHORE(ifacelock, 1);
++#endif
+
+ static void wctdm_release(struct wctdm *wc);
+
+--
+2.39.2
+
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/dahdi-linux: Fix build on Linux 6.4
2023-07-09 15:19 [Buildroot] [PATCH 1/1] package/dahdi-linux: Fix build on Linux 6.4 Bernd Kuhls
@ 2023-07-09 16:32 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-09 16:32 UTC (permalink / raw)
To: Bernd Kuhls; +Cc: Yann E . MORIN, buildroot
On Sun, 9 Jul 2023 17:19:19 +0200
Bernd Kuhls <bernd@kuhls.net> wrote:
> Fixes:
> http://autobuild.buildroot.net/results/8b1/8b140b7f4d2f2b3080cab90906c3cebea0e510c5/
>
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> ---
> .../0006-Fix-build-on-Linux-6.4.patch | 69 +++++++++++++++++++
> 1 file changed, 69 insertions(+)
> create mode 100644 package/dahdi-linux/0006-Fix-build-on-Linux-6.4.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-09 16:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-09 15:19 [Buildroot] [PATCH 1/1] package/dahdi-linux: Fix build on Linux 6.4 Bernd Kuhls
2023-07-09 16:32 ` Thomas Petazzoni via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.