Commit 677b993a authored by Geordan Neukum's avatar Geordan Neukum Committed by Greg Kroah-Hartman

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: default avatarGeordan Neukum <gneukum1@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1914e9eb
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment