[PATCH 09/47] patches: Remove const from struct rchan_callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The struct rchan_callbacks parameter to the relay_open function was
changed to const in kernel 5.11 and the drivers were adapted. On older
kernel versions the struct rchan_callbacks should not be costs.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 ...05-remove-const-from-rchan_callbacks.patch | 42 +++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 patches/0105-remove-const-from-rchan_callbacks.patch

diff --git a/patches/0105-remove-const-from-rchan_callbacks.patch b/patches/0105-remove-const-from-rchan_callbacks.patch
new file mode 100644
index 00000000..16c14707
--- /dev/null
+++ b/patches/0105-remove-const-from-rchan_callbacks.patch
@@ -0,0 +1,42 @@
+--- a/drivers/net/wireless/ath/ath10k/spectral.c
++++ b/drivers/net/wireless/ath/ath10k/spectral.c
+@@ -497,7 +497,11 @@ static int remove_buf_file_handler(struc
+ 	return 0;
+ }
+ 
++#if LINUX_VERSION_IS_GEQ(5,11,0)
+ static const struct rchan_callbacks rfs_spec_scan_cb = {
++#else
++static struct rchan_callbacks rfs_spec_scan_cb = {
++#endif
+ 	.create_buf_file = create_buf_file_handler,
+ 	.remove_buf_file = remove_buf_file_handler,
+ };
+--- a/drivers/net/wireless/ath/ath11k/spectral.c
++++ b/drivers/net/wireless/ath/ath11k/spectral.c
+@@ -148,7 +148,11 @@ static int remove_buf_file_handler(struc
+ 	return 0;
+ }
+ 
++#if LINUX_VERSION_IS_GEQ(5,11,0)
+ static const struct rchan_callbacks rfs_scan_cb = {
++#else
++static struct rchan_callbacks rfs_scan_cb = {
++#endif
+ 	.create_buf_file = create_buf_file_handler,
+ 	.remove_buf_file = remove_buf_file_handler,
+ };
+--- a/drivers/net/wireless/ath/ath9k/common-spectral.c
++++ b/drivers/net/wireless/ath/ath9k/common-spectral.c
+@@ -1053,7 +1053,11 @@ static int remove_buf_file_handler(struc
+ 	return 0;
+ }
+ 
++#if LINUX_VERSION_IS_GEQ(5,11,0)
+ static const struct rchan_callbacks rfs_spec_scan_cb = {
++#else
++static struct rchan_callbacks rfs_spec_scan_cb = {
++#endif
+ 	.create_buf_file = create_buf_file_handler,
+ 	.remove_buf_file = remove_buf_file_handler,
+ };
-- 
2.30.2

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux