staging: ccree: Convert to devm_ioremap_resource for map, unmap
authorSuniel Mahesh <sunil.m@techveda.org>
Thu, 7 Sep 2017 09:00:10 +0000 (12:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Sep 2017 14:35:25 +0000 (16:35 +0200)
commitce58df6394c2a830ca184c2e9fe8d1bb425a665a
tree5b14b649223f4eebd086d306a0cdf6f0348b1c90
parent92c9f472020c8bb15b949a7d69087388d6391954
staging: ccree: Convert to devm_ioremap_resource for map, unmap

It is recommended to use managed function devm_ioremap_resource(),
which simplifies driver cleanup paths and driver code.
This patch does the following:
(a) replace request_mem_region(), ioremap() and corresponding error
handling with devm_ioremap_resource().
(b) remove struct resource pointer(res_mem) in struct ssi_drvdata as it
seems redundant, use struct resource pointer which is defined locally and
adjust return value of platform_get_resource() accordingly.
(c) release_mem_region() and iounmap() are dropped, since devm_ioremap_
resource() releases and unmaps mem region on driver detach.
(d) adjust log messages accordingly and remove any blank lines.

Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
[gby: rebase on top of latest coding style fixes changes]
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ccree/ssi_driver.c
drivers/staging/ccree/ssi_driver.h