aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTian Tao <[email protected]>2020-11-23 15:02:55 +0800
committerMark Brown <[email protected]>2020-11-25 12:54:44 +0000
commit459ea85049b01708e364c34deac24b00909c73ed (patch)
treee88ce59236c57d89a820dce08d7ee4dab7c9b8a5
parenta6f483b2e4415bca7af90346204f93f63b90acdd (diff)
spi: dw: fixed missing resource_size
fixed the coccicheck: drivers/spi/spi-dw-bt1.c:220:27-30: ERROR: Missing resource_size with mem. Signed-off-by: Tian Tao <[email protected]> Acked-by: Serge Semin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--drivers/spi/spi-dw-bt1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-dw-bt1.c b/drivers/spi/spi-dw-bt1.c
index f382dfad7842..da4f4d82617c 100644
--- a/drivers/spi/spi-dw-bt1.c
+++ b/drivers/spi/spi-dw-bt1.c
@@ -217,7 +217,7 @@ static int dw_spi_bt1_sys_init(struct platform_device *pdev,
if (mem) {
dwsbt1->map = devm_ioremap_resource(&pdev->dev, mem);
if (!IS_ERR(dwsbt1->map)) {
- dwsbt1->map_len = (mem->end - mem->start + 1);
+ dwsbt1->map_len = resource_size(mem);
dws->mem_ops.dirmap_create = dw_spi_bt1_dirmap_create;
dws->mem_ops.dirmap_read = dw_spi_bt1_dirmap_read;
} else {