diff options
author | Wang Qing <wangqing@vivo.com> | 2021-12-14 15:18:36 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-05 14:34:58 +0300 |
commit | 451dcbd4a94e7457045bd9e4ea8ef8347df028f6 (patch) | |
tree | b7123137d95263555e8d2917c3dcdf4de22d78be /drivers | |
parent | 31425ac932c547643df604307802a3e438d9a415 (diff) | |
download | linux-451dcbd4a94e7457045bd9e4ea8ef8347df028f6.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')
-rw-r--r-- | drivers/platform/x86/apple-gmux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c index fd2ffebc868f..caa03565c139 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", |