Skip to content

Commit bc88606

Browse files
Gilad Ben-Yossefherbertx
authored andcommitted
crypto: ccree - make cc_pm_put_suspend() void
cc_pm_put_suspend() return value was never checked and is not useful. Turn it into a void functions. Signed-off-by: Gilad Ben-Yossef <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 33c4b31 commit bc88606

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

drivers/crypto/ccree/cc_pm.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,14 @@ int cc_pm_get(struct device *dev)
7373
return (rc == 1 ? 0 : rc);
7474
}
7575

76-
int cc_pm_put_suspend(struct device *dev)
76+
void cc_pm_put_suspend(struct device *dev)
7777
{
78-
int rc = 0;
7978
struct cc_drvdata *drvdata = dev_get_drvdata(dev);
8079

8180
if (drvdata->pm_on) {
8281
pm_runtime_mark_last_busy(dev);
83-
rc = pm_runtime_put_autosuspend(dev);
82+
pm_runtime_put_autosuspend(dev);
8483
}
85-
86-
return rc;
8784
}
8885

8986
bool cc_pm_is_dev_suspended(struct device *dev)

drivers/crypto/ccree/cc_pm.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void cc_pm_fini(struct cc_drvdata *drvdata);
2121
int cc_pm_suspend(struct device *dev);
2222
int cc_pm_resume(struct device *dev);
2323
int cc_pm_get(struct device *dev);
24-
int cc_pm_put_suspend(struct device *dev);
24+
void cc_pm_put_suspend(struct device *dev);
2525
bool cc_pm_is_dev_suspended(struct device *dev);
2626

2727
#else
@@ -50,10 +50,7 @@ static inline int cc_pm_get(struct device *dev)
5050
return 0;
5151
}
5252

53-
static inline int cc_pm_put_suspend(struct device *dev)
54-
{
55-
return 0;
56-
}
53+
static inline void cc_pm_put_suspend(struct device *dev) {}
5754

5855
static inline bool cc_pm_is_dev_suspended(struct device *dev)
5956
{

0 commit comments

Comments
 (0)