Skip to content

Commit

Permalink
platform/x86: apple-gmux: use resource_size() with res
Browse files Browse the repository at this point in the history
[ Upstream commit eb66fb0 ]

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>
  • Loading branch information
Wang Qing authored and gregkh committed Jan 5, 2022
1 parent 6964e81 commit ea48bff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/apple-gmux.c
Expand Up @@ -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",
Expand Down

0 comments on commit ea48bff

Please sign in to comment.