summaryrefslogtreecommitdiffstats
path: root/drivers/clk/at91/clk-system.c
diff options
context:
space:
mode:
authorClaudiu Beznea <claudiu.beznea@microchip.com>2020-07-22 10:38:17 +0300
committerStephen Boyd <sboyd@kernel.org>2020-07-24 02:19:08 -0700
commit42324d953b38e74cf5cb05a02c81d4922a2ddcd5 (patch)
tree5f8529d2163ab4ec95f74ef40b10bec7910f809c /drivers/clk/at91/clk-system.c
parente1e3e7008a90f9ffe0161191bd64a4c06f0d417a (diff)
downloadlinux-42324d953b38e74cf5cb05a02c81d4922a2ddcd5.tar.bz2
clk: at91: replace conditional operator with double logical not
Replace conditional operator with double logical not as code may be simpler to read. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/1595403506-8209-10-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/at91/clk-system.c')
-rw-r--r--drivers/clk/at91/clk-system.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/at91/clk-system.c b/drivers/clk/at91/clk-system.c
index c4b3877aa445..f83ec0de86c3 100644
--- a/drivers/clk/at91/clk-system.c
+++ b/drivers/clk/at91/clk-system.c
@@ -34,7 +34,7 @@ static inline bool clk_system_ready(struct regmap *regmap, int id)
regmap_read(regmap, AT91_PMC_SR, &status);
- return status & (1 << id) ? 1 : 0;
+ return !!(status & (1 << id));
}
static int clk_system_prepare(struct clk_hw *hw)
@@ -74,7 +74,7 @@ static int clk_system_is_prepared(struct clk_hw *hw)
regmap_read(sys->regmap, AT91_PMC_SR, &status);
- return status & (1 << sys->id) ? 1 : 0;
+ return !!(status & (1 << sys->id));
}
static const struct clk_ops system_ops = {