diff options
author | Wang Qing <wangqing@vivo.com> | 2021-12-14 13:18:36 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-12-21 18:53:03 +0100 |
commit | 855045873b54b9f8dd71a0468db9ff52aa27444f (patch) | |
tree | 8cb31ac69eaf724390e70a4071bcadaf32954865 /drivers/platform | |
parent | platform/x86: amd-pmc: only use callbacks for suspend (diff) | |
download | linux-855045873b54b9f8dd71a0468db9ff52aa27444f.tar.xz linux-855045873b54b9f8dd71a0468db9ff52aa27444f.zip |
platform/x86: apple-gmux: use resource_size() with res
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>
Diffstat (limited to 'drivers/platform')
-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 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", |