summaryrefslogtreecommitdiff
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:31:24 +0300
commit2cbc2b5413275b965bd5b01e2b43dbf04b4f9f97 (patch)
tree4918e08de3a48aeb773a1d9ca20b754bc02355ad
parent33e2a59d5a735a29df21044542ad7223b79c537b (diff)
downloadlinux-2cbc2b5413275b965bd5b01e2b43dbf04b4f9f97.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>
-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 a66be137324c..76f5703bc4f6 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",