diff options
author | Geordan Neukum <gneukum1@gmail.com> | 2019-06-02 15:58:37 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-03 14:17:01 +0200 |
commit | 677b993a574957975c95c1f01a06d695161e9832 (patch) | |
tree | 60808499b973ca07cc35239c96c6e7d1d53b6948 /drivers/staging/kpc2000 | |
parent | 1914e9ebd362af679a4bf384e7960d47788d27e1 (diff) | |
download | blackbird-op-linux-677b993a574957975c95c1f01a06d695161e9832.tar.gz blackbird-op-linux-677b993a574957975c95c1f01a06d695161e9832.zip |
staging: kpc2000: kpc_spi: use devm_* API to manage mapped I/O space
The kpc_spi driver does not unmap its I/O space upon error cases in the
probe() function or upon remove(). Make the driver clean up after itself
more maintainably by migrating to using the managed resource API.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/kpc2000')
-rw-r--r-- | drivers/staging/kpc2000/kpc2000_spi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c index b513432a26ed..32d3ec532e26 100644 --- a/drivers/staging/kpc2000/kpc2000_spi.c +++ b/drivers/staging/kpc2000/kpc2000_spi.c @@ -471,7 +471,8 @@ kp_spi_probe(struct platform_device *pldev) goto free_master; } - kpspi->phys = (unsigned long)ioremap_nocache(r->start, resource_size(r)); + kpspi->phys = (unsigned long)devm_ioremap_nocache(&pldev->dev, r->start, + resource_size(r)); kpspi->base = (u64 __iomem *)kpspi->phys; status = spi_register_master(master); |