diff options
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 2 | ||||
-rw-r--r-- | drivers/staging/kpc2000/kpc_spi/spi_driver.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c b/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c index 6bb6ad4abe87..1fc30dc687f9 100644 --- a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c +++ b/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c @@ -632,7 +632,7 @@ int pi2c_probe(struct platform_device *pldev) priv->adapter.algo = &smbus_algorithm; res = platform_get_resource(pldev, IORESOURCE_MEM, 0); - priv->smba = (unsigned long)ioremap_nocache(res->start, res->end - res->start); + priv->smba = (unsigned long)ioremap_nocache(res->start, resource_size(res)); priv->pldev = pldev; pldev->dev.platform_data = priv; diff --git a/drivers/staging/kpc2000/kpc_spi/spi_driver.c b/drivers/staging/kpc2000/kpc_spi/spi_driver.c index c0999e080577..074a578153d0 100644 --- a/drivers/staging/kpc2000/kpc_spi/spi_driver.c +++ b/drivers/staging/kpc2000/kpc_spi/spi_driver.c @@ -452,7 +452,7 @@ kp_spi_probe(struct platform_device *pldev) goto free_master; } - kpspi->phys = (unsigned long)ioremap_nocache(r->start, r->end - r->start); + kpspi->phys = (unsigned long)ioremap_nocache(r->start, resource_size(r)); kpspi->base = (u64 __iomem *)kpspi->phys; status = spi_register_master(master); |