]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.4
authorSasha Levin <sashal@kernel.org>
Thu, 30 Dec 2021 02:22:50 +0000 (21:22 -0500)
committerSasha Levin <sashal@kernel.org>
Thu, 30 Dec 2021 02:22:50 +0000 (21:22 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.4/platform-x86-apple-gmux-use-resource_size-with-res.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/platform-x86-apple-gmux-use-resource_size-with-res.patch b/queue-4.4/platform-x86-apple-gmux-use-resource_size-with-res.patch
new file mode 100644 (file)
index 0000000..51abf7b
--- /dev/null
@@ -0,0 +1,37 @@
+From 16d2afad820f6a16317008e82695331cfe1b6822 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 14 Dec 2021 04:18:36 -0800
+Subject: platform/x86: apple-gmux: use resource_size() with res
+
+From: Wang Qing <wangqing@vivo.com>
+
+[ Upstream commit eb66fb03a727cde0ab9b1a3858de55c26f3007da ]
+
+This should be (res->end - res->start + 1) here actually,
+use resource_size() derectly.
+
+Signed-off-by: Wang Qing <wangqing@vivo.com>
+Link: https://lore.kernel.org/r/1639484316-75873-1-git-send-email-wangqing@vivo.com
+Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/platform/x86/apple-gmux.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
+index 976efeb3f2ba3..a0f10ccdca3e4 100644
+--- a/drivers/platform/x86/apple-gmux.c
++++ b/drivers/platform/x86/apple-gmux.c
+@@ -461,7 +461,7 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
+       }
+       gmux_data->iostart = res->start;
+-      gmux_data->iolen = res->end - res->start;
++      gmux_data->iolen = resource_size(res);
+       if (gmux_data->iolen < GMUX_MIN_IO_LEN) {
+               pr_err("gmux I/O region too small (%lu < %u)\n",
+-- 
+2.34.1
+
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b5e34deb28b9da911ce98318e9486e330016da12 100644 (file)
@@ -0,0 +1 @@
+platform-x86-apple-gmux-use-resource_size-with-res.patch