projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bf8ee0
)
pwm: sifive: Simplify if-if to if-else
author
Wan Jiabing
<wanjiabing@vivo.com>
Fri, 8 Apr 2022 08:30:07 +0000
(16:30 +0800)
committer
Thierry Reding
<thierry.reding@gmail.com>
Fri, 20 May 2022 13:57:43 +0000
(15:57 +0200)
Use if and else instead of if(A) and if (!A).
Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-sifive.c
patch
|
blob
|
history
diff --git
a/drivers/pwm/pwm-sifive.c
b/drivers/pwm/pwm-sifive.c
index 253c4a17d25530ee30859dbc0853bc689c36a03f..e6d05a329002694bc50d3e05ee631a34f53487d4 100644
(file)
--- a/
drivers/pwm/pwm-sifive.c
+++ b/
drivers/pwm/pwm-sifive.c
@@
-138,10
+138,9
@@
static int pwm_sifive_enable(struct pwm_chip *chip, bool enable)
dev_err(ddata->chip.dev, "Enable clk failed\n");
return ret;
}
- }
-
- if (!enable)
+ } else {
clk_disable(ddata->clk);
+ }
return 0;
}