diff options
-rw-r--r-- | drivers/spi/spi_bfin5xx.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c index 0e33b5aa35fb..6a02bd3ef9fd 100644 --- a/drivers/spi/spi_bfin5xx.c +++ b/drivers/spi/spi_bfin5xx.c | |||
@@ -78,7 +78,7 @@ struct driver_data { | |||
78 | struct spi_master *master; | 78 | struct spi_master *master; |
79 | 79 | ||
80 | /* Regs base of SPI controller */ | 80 | /* Regs base of SPI controller */ |
81 | u32 regs_base; | 81 | void __iomem *regs_base; |
82 | 82 | ||
83 | /* BFIN hookup */ | 83 | /* BFIN hookup */ |
84 | struct bfin5xx_spi_master *master_info; | 84 | struct bfin5xx_spi_master *master_info; |
@@ -1311,9 +1311,8 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev) | |||
1311 | goto out_error_get_res; | 1311 | goto out_error_get_res; |
1312 | } | 1312 | } |
1313 | 1313 | ||
1314 | drv_data->regs_base = (u32) ioremap(res->start, | 1314 | drv_data->regs_base = ioremap(res->start, (res->end - res->start + 1)); |
1315 | (res->end - res->start + 1)); | 1315 | if (drv_data->regs_base == NULL) { |
1316 | if (!drv_data->regs_base) { | ||
1317 | dev_err(dev, "Cannot map IO\n"); | 1316 | dev_err(dev, "Cannot map IO\n"); |
1318 | status = -ENXIO; | 1317 | status = -ENXIO; |
1319 | goto out_error_ioremap; | 1318 | goto out_error_ioremap; |
@@ -1352,7 +1351,7 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev) | |||
1352 | goto out_error; | 1351 | goto out_error; |
1353 | } | 1352 | } |
1354 | 1353 | ||
1355 | dev_info(dev, "%s, Version %s, regs_base@0x%08x, dma channel@%d\n", | 1354 | dev_info(dev, "%s, Version %s, regs_base@%p, dma channel@%d\n", |
1356 | DRV_DESC, DRV_VERSION, drv_data->regs_base, | 1355 | DRV_DESC, DRV_VERSION, drv_data->regs_base, |
1357 | drv_data->dma_channel); | 1356 | drv_data->dma_channel); |
1358 | return status; | 1357 | return status; |