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>
This commit is contained in:
Родитель
1914e9ebd3
Коммит
677b993a57
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче