Skip to content

Commit aff664c

Browse files
committed
clk: renesas: Use str_on_off() helper
Use the str_on_off() helper instead of open-coding the same operation. Note that this does change the case of the flags, which doesn't matter much for debug messages. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/622f8554dcb815c8fc73511a1a118c1724570fa9.1745840497.git.geert+renesas@glider.be
1 parent 93f2878 commit aff664c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/clk/renesas/renesas-cpg-mssr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <linux/psci.h>
2828
#include <linux/reset-controller.h>
2929
#include <linux/slab.h>
30+
#include <linux/string_choices.h>
3031

3132
#include <dt-bindings/clock/renesas-cpg-mssr.h>
3233

@@ -204,7 +205,7 @@ static int cpg_mstp_clock_endisable(struct clk_hw *hw, bool enable)
204205
int error;
205206

206207
dev_dbg(dev, "MSTP %u%02u/%pC %s\n", reg, bit, hw->clk,
207-
enable ? "ON" : "OFF");
208+
str_on_off(enable));
208209
spin_lock_irqsave(&priv->rmw_lock, flags);
209210

210211
if (priv->reg_layout == CLK_REG_LAYOUT_RZ_A) {

drivers/clk/renesas/rzg2l-cpg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <linux/pm_domain.h>
2828
#include <linux/reset-controller.h>
2929
#include <linux/slab.h>
30+
#include <linux/string_choices.h>
3031
#include <linux/units.h>
3132

3233
#include <dt-bindings/clock/renesas-cpg-mssr.h>
@@ -1217,7 +1218,7 @@ static int rzg2l_mod_clock_endisable(struct clk_hw *hw, bool enable)
12171218
}
12181219

12191220
dev_dbg(dev, "CLK_ON 0x%x/%pC %s\n", CLK_ON_R(reg), hw->clk,
1220-
enable ? "ON" : "OFF");
1221+
str_on_off(enable));
12211222

12221223
value = bitmask << 16;
12231224
if (enable)

0 commit comments

Comments
 (0)