Skip to content

Commit eb66fb0

Browse files
Wang Qingjwrdegoede
authored andcommitted
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>
1 parent 09fc140 commit eb66fb0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/platform/x86/apple-gmux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id)
625625
}
626626

627627
gmux_data->iostart = res->start;
628-
gmux_data->iolen = res->end - res->start;
628+
gmux_data->iolen = resource_size(res);
629629

630630
if (gmux_data->iolen < GMUX_MIN_IO_LEN) {
631631
pr_err("gmux I/O region too small (%lu < %u)\n",

0 commit comments

Comments
 (0)