mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
09fc14061f
commit
eb66fb03a7
1 changed files with 1 additions and 1 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Reference in a new issue