diff options
author | Tian Tao <tiantao6@hisilicon.com> | 2020-11-23 10:02:55 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-11-25 15:54:44 +0300 |
commit | 459ea85049b01708e364c34deac24b00909c73ed (patch) | |
tree | e88ce59236c57d89a820dce08d7ee4dab7c9b8a5 /drivers/spi | |
parent | a6f483b2e4415bca7af90346204f93f63b90acdd (diff) | |
download | linux-459ea85049b01708e364c34deac24b00909c73ed.tar.xz |
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 <tiantao6@hisilicon.com>
Acked-by: Serge Semin <fancer.lancer@gmail.com>
Link: https://lore.kernel.org/r/1606114975-31362-1-git-send-email-tiantao6@hisilicon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-dw-bt1.c | 2 |
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 { |