Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-07 19:14:38 +0200
committerTakashi Iwai <tiwai@suse.de>2018-07-07 19:14:38 +0200
commit66fde11e9424e65b0e314b176e7f25ad9ea638a1 (patch)
treea35178a47bb472729cb301074d77408a9c653a12
parentf93705fdd910b3338a8e427c8bc32d2786e413be (diff)
Fix kABI breakage of iio_buffer in 4.4.139 (stable-4.4.139).
-rw-r--r--patches.kabi/iio-kabi-fix-for-iio_buffer.patch47
-rw-r--r--series.conf2
2 files changed, 49 insertions, 0 deletions
diff --git a/patches.kabi/iio-kabi-fix-for-iio_buffer.patch b/patches.kabi/iio-kabi-fix-for-iio_buffer.patch
new file mode 100644
index 0000000000..063d36b1af
--- /dev/null
+++ b/patches.kabi/iio-kabi-fix-for-iio_buffer.patch
@@ -0,0 +1,47 @@
+From: Takashi Iwai <tiwai@suse.de>
+Subject: Fix kABI breakage of iio_buffer in 4.4.139
+Patch-mainline: Never, kABI fix
+References: stable-4.4.139
+
+The recent iio fix
+ patches.kernel.org/4.4.139-062-iio-buffer-make-length-types-match-kfifo-type.patch
+caused a kABI breakage due to the changes from int to unsigned and
+size_t. For fixing this, revert to int for declaration, and use only
+unsigned for keeping alignment.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ include/linux/iio/buffer.h | 12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+--- a/include/linux/iio/buffer.h
++++ b/include/linux/iio/buffer.h
+@@ -49,8 +49,11 @@ struct iio_buffer_access_funcs {
+ int (*request_update)(struct iio_buffer *buffer);
+
+ int (*set_bytes_per_datum)(struct iio_buffer *buffer, size_t bpd);
++#ifdef __GENKSYMS__
++ int (*set_length)(struct iio_buffer *buffer, int length);
++#else
+ int (*set_length)(struct iio_buffer *buffer, unsigned int length);
+-
++#endif
+ void (*release)(struct iio_buffer *buffer);
+
+ unsigned int modes;
+@@ -78,8 +81,13 @@ struct iio_buffer_access_funcs {
+ * @watermark: [INTERN] number of datums to wait for poll/read.
+ */
+ struct iio_buffer {
++#ifdef __GENKSYMS__
++ int length;
++ int bytes_per_datum;
++#else
+ unsigned int length;
+- size_t bytes_per_datum;
++ unsigned int bytes_per_datum;
++#endif
+ struct attribute_group *scan_el_attrs;
+ long *scan_mask;
+ bool scan_timestamp;
diff --git a/series.conf b/series.conf
index 72a7ed9025..45856751f5 100644
--- a/series.conf
+++ b/series.conf
@@ -17540,6 +17540,8 @@
patches.drivers/regmap-Format-data-for-raw-write-in-regmap_bulk_writ
patches.drivers/regmap-i2c-Off-by-one-in-regmap_i2c_smbus_i2c_read-w
+ patches.kabi/iio-kabi-fix-for-iio_buffer.patch
+
########################################################
# Other drivers we have added to the tree
########################################################