projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f570741
)
video: fbdev: sh_mobile_lcdcfb: Remove redundant null check before clk_prepare_enable...
author
Xu Wang
<vulab@iscas.ac.cn>
Wed, 14 Oct 2020 08:57:22 +0000
(08:57 +0000)
committer
Thomas Zimmermann
<tzimmermann@suse.de>
Fri, 16 Oct 2020 09:50:31 +0000
(11:50 +0200)
Because clk_prepare_enable() and clk_disable_unprepare() already checked
NULL clock parameter, so the additional checks are unnecessary, just
remove them.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link:
https://patchwork.freedesktop.org/patch/msgid/20201014085722.26069-1-vulab@iscas.ac.cn
drivers/video/fbdev/sh_mobile_lcdcfb.c
patch
|
blob
|
history
diff --git
a/drivers/video/fbdev/sh_mobile_lcdcfb.c
b/drivers/video/fbdev/sh_mobile_lcdcfb.c
index c1043420dbd3e0e3521f13e32842be4f9765c7bd..c0952cc96bdb8a7927838f318f1697ee6eb76670 100644
(file)
--- a/
drivers/video/fbdev/sh_mobile_lcdcfb.c
+++ b/
drivers/video/fbdev/sh_mobile_lcdcfb.c
@@
-341,8
+341,7
@@
static void lcdc_wait_bit(struct sh_mobile_lcdc_priv *priv,
static void sh_mobile_lcdc_clk_on(struct sh_mobile_lcdc_priv *priv)
{
if (atomic_inc_and_test(&priv->hw_usecnt)) {
- if (priv->dot_clk)
- clk_prepare_enable(priv->dot_clk);
+ clk_prepare_enable(priv->dot_clk);
pm_runtime_get_sync(priv->dev);
}
}
@@
-351,8
+350,7
@@
static void sh_mobile_lcdc_clk_off(struct sh_mobile_lcdc_priv *priv)
{
if (atomic_sub_return(1, &priv->hw_usecnt) == -1) {
pm_runtime_put(priv->dev);
- if (priv->dot_clk)
- clk_disable_unprepare(priv->dot_clk);
+ clk_disable_unprepare(priv->dot_clk);
}
}