diff mbox series

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

Message ID 20211019214320.2035704-10-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to kernel 5.15-rc6 | expand

Commit Message

Hauke Mehrtens Oct. 19, 2021, 9:42 p.m. UTC
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@hauke-m.de>
---
 ...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 mbox series

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,
+ };