TCON TOP mux blocks in R40 are registering clock using
tcon top clock index numbers.

Right now the code is using, real numbers start with 0, but
we have proper macros that defined these name index numbers.

Use the existing macros, instead of real numbers for more
code readability.

Signed-off-by: Jagan Teki <ja...@amarulasolutions.com>
---
Changes for v3:
- none

 drivers/gpu/drm/sun4i/sun8i_tcon_top.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c 
b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
index 75d8e60c149d..e0b3c5330b9a 100644
--- a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
+++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
@@ -194,19 +194,22 @@ static int sun8i_tcon_top_bind(struct device *dev, struct 
device *master,
        clk_data->hws[CLK_TCON_TOP_TV0] =
                sun8i_tcon_top_register_gate(dev, "tcon-tv0", regs,
                                             &tcon_top->reg_lock,
-                                            TCON_TOP_TCON_TV0_GATE, 0);
+                                            TCON_TOP_TCON_TV0_GATE,
+                                            CLK_TCON_TOP_TV0);
 
        if (quirks->has_tcon_tv1)
                clk_data->hws[CLK_TCON_TOP_TV1] =
                        sun8i_tcon_top_register_gate(dev, "tcon-tv1", regs,
                                                     &tcon_top->reg_lock,
-                                                    TCON_TOP_TCON_TV1_GATE, 1);
+                                                    TCON_TOP_TCON_TV1_GATE,
+                                                    CLK_TCON_TOP_TV1);
 
        if (quirks->has_dsi)
                clk_data->hws[CLK_TCON_TOP_DSI] =
                        sun8i_tcon_top_register_gate(dev, "dsi", regs,
                                                     &tcon_top->reg_lock,
-                                                    TCON_TOP_TCON_DSI_GATE, 2);
+                                                    TCON_TOP_TCON_DSI_GATE,
+                                                    CLK_TCON_TOP_DSI);
 
        for (i = 0; i < CLK_NUM; i++)
                if (IS_ERR(clk_data->hws[i])) {
-- 
2.18.0.321.gffc6fa0e3

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/linux-sunxi/20191231130528.20669-5-jagan%40amarulasolutions.com.

Reply via email to