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:33:48 +0300
commit3df97bd339d1908caa1fb7767ca5c8ff77cb148d (patch)
treeb20fe3d9c84fe1bd074ae71ff3f8e8e8f42956e8 /drivers/platform
parent3d556a28bbfe34a80b014db49908b0f1bcb1ae80 (diff)
downloadlinux-3df97bd339d1908caa1fb7767ca5c8ff77cb148d.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 7c4eb86c851e..5463d740f352 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",