From: Sasha Levin Date: Thu, 30 Dec 2021 02:22:49 +0000 (-0500) Subject: Fixes for 4.9 X-Git-Tag: v4.4.298~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8f9ca20a82489a65b449faf429dc440caa736770;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.9 Signed-off-by: Sasha Levin --- diff --git a/queue-4.9/platform-x86-apple-gmux-use-resource_size-with-res.patch b/queue-4.9/platform-x86-apple-gmux-use-resource_size-with-res.patch new file mode 100644 index 00000000000..212eff10690 --- /dev/null +++ b/queue-4.9/platform-x86-apple-gmux-use-resource_size-with-res.patch @@ -0,0 +1,37 @@ +From 8df94d47d6809a51154bc041f5ccf69b5877aeff Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 14 Dec 2021 04:18:36 -0800 +Subject: platform/x86: apple-gmux: use resource_size() with res + +From: Wang Qing + +[ Upstream commit eb66fb03a727cde0ab9b1a3858de55c26f3007da ] + +This should be (res->end - res->start + 1) here actually, +use resource_size() derectly. + +Signed-off-by: Wang Qing +Link: https://lore.kernel.org/r/1639484316-75873-1-git-send-email-wangqing@vivo.com +Reviewed-by: Hans de Goede +Signed-off-by: Hans de Goede +Signed-off-by: Sasha Levin +--- + 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 a66be137324c0..76f5703bc4f65 100644 +--- a/drivers/platform/x86/apple-gmux.c ++++ b/drivers/platform/x86/apple-gmux.c +@@ -628,7 +628,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 + diff --git a/queue-4.9/series b/queue-4.9/series index c00d36bf0d8..4516927ad43 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -1 +1,2 @@ hid-asus-add-depends-on-usb_hid-to-hid_asus-kconfig-option.patch +platform-x86-apple-gmux-use-resource_size-with-res.patch