summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorWang Qing <wangqing@vivo.com>2021-12-14 15:18:36 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-05 14:42:33 +0300
commitea48bffecc3ed1fc137502ad7d4d396c904aa2d8 (patch)
tree230b429eece75a1a664d330b9e178f3a146c56c1 /drivers/platform
parent6964e81f11cec6980c9bb89e081fe1dc2d17ec27 (diff)
downloadlinux-ea48bffecc3ed1fc137502ad7d4d396c904aa2d8.tar.xz
platform/x86: apple-gmux: use resource_size() with res
[ 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>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/apple-gmux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
index 9aae45a45200..57553f9b4d1d 100644
--- a/drivers/platform/x86/apple-gmux.c
+++ b/drivers/platform/x86/apple-gmux.c
@@ -625,7 +625,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",