diff options
author | Claudiu Beznea <claudiu.beznea@microchip.com> | 2020-07-22 10:38:17 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2020-07-24 12:19:08 +0300 |
commit | 42324d953b38e74cf5cb05a02c81d4922a2ddcd5 (patch) | |
tree | 5f8529d2163ab4ec95f74ef40b10bec7910f809c /drivers/clk/at91/clk-main.c | |
parent | e1e3e7008a90f9ffe0161191bd64a4c06f0d417a (diff) | |
download | linux-42324d953b38e74cf5cb05a02c81d4922a2ddcd5.tar.xz |
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-main.c')
-rw-r--r-- | drivers/clk/at91/clk-main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/clk/at91/clk-main.c b/drivers/clk/at91/clk-main.c index 37c22667e831..5c83e899084f 100644 --- a/drivers/clk/at91/clk-main.c +++ b/drivers/clk/at91/clk-main.c @@ -175,7 +175,7 @@ static bool clk_main_rc_osc_ready(struct regmap *regmap) regmap_read(regmap, AT91_PMC_SR, &status); - return status & AT91_PMC_MOSCRCS; + return !!(status & AT91_PMC_MOSCRCS); } static int clk_main_rc_osc_prepare(struct clk_hw *hw) @@ -336,7 +336,7 @@ static int clk_rm9200_main_is_prepared(struct clk_hw *hw) regmap_read(clkmain->regmap, AT91_CKGR_MCFR, &status); - return status & AT91_PMC_MAINRDY ? 1 : 0; + return !!(status & AT91_PMC_MAINRDY); } static unsigned long clk_rm9200_main_recalc_rate(struct clk_hw *hw, @@ -398,7 +398,7 @@ static inline bool clk_sam9x5_main_ready(struct regmap *regmap) regmap_read(regmap, AT91_PMC_SR, &status); - return status & AT91_PMC_MOSCSELS ? 1 : 0; + return !!(status & AT91_PMC_MOSCSELS); } static int clk_sam9x5_main_prepare(struct clk_hw *hw) |