diff options
author | Suniel Mahesh <sunil.m@techveda.org> | 2017-09-07 12:00:11 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-17 17:35:25 +0300 |
commit | 7f6f832d258a1b411dcc3ba9345ed3036fe05ca5 (patch) | |
tree | c35c8e4fb5969918b5ed892c66981f0cd68f87ff /drivers/staging/ccree/ssi_driver.h | |
parent | ce58df6394c2a830ca184c2e9fe8d1bb425a665a (diff) | |
download | linux-7f6f832d258a1b411dcc3ba9345ed3036fe05ca5.tar.xz |
staging: ccree: Use platform_get_irq and devm_request_irq
It is recommended to use managed function devm_request_irq(),
which simplifies driver cleanup paths and driver code.
This patch does the following:
(a) replace platform_get_resource(), request_irq() and corresponding
error handling with platform_get_irq() and devm_request_irq().
(b) remove struct resource pointer(res_irq) in struct ssi_drvdata as
it seems redundant.
(c) change type of member irq in struct ssi_drvdata from unsigned int
to int, as return type of platform_get_irq is int and can be used in
error handling.
(d) remove irq_registered variable from driver probe as it seems
redundant.
(e) free_irq is not required any more, devm_request_irq() free's it
on driver detach.
(f) adjust log messages accordingly and remove any blank lines.
Signed-off-by: Suniel Mahesh <sunil.m@techveda.org>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ccree/ssi_driver.h')
-rw-r--r-- | drivers/staging/ccree/ssi_driver.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/ccree/ssi_driver.h b/drivers/staging/ccree/ssi_driver.h index 518c0bfbadf4..88ef3700b53c 100644 --- a/drivers/staging/ccree/ssi_driver.h +++ b/drivers/staging/ccree/ssi_driver.h @@ -128,9 +128,8 @@ struct ssi_crypto_req { * @fw_ver: SeP loaded firmware version */ struct ssi_drvdata { - struct resource *res_irq; void __iomem *cc_base; - unsigned int irq; + int irq; u32 irq_mask; u32 fw_ver; /* Calibration time of start/stop |