drm: msm: hdmi: Constify static structs
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Mon, 20 Sep 2021 21:20:14 +0000 (23:20 +0200)
committerRob Clark <robdclark@chromium.org>
Fri, 15 Oct 2021 20:26:33 +0000 (13:26 -0700)
The only usage of hdmi_8996_pll_ops is to assign its address to the ops
field in the clk_init_data struct, and the only usage of pll_init is to
assign its address to the init field in the clk_hw struct, both which
are pointers to const. Make them const to allow the compiler to put them
in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20210920212014.40520-1-rikard.falkeborn@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c

index a8f3b2cbfdc53052112d5ef1cdaf9222c746db57..99c7853353fd6872a9bc410f04f479fc80a27687 100644 (file)
@@ -682,7 +682,7 @@ static int hdmi_8996_pll_is_enabled(struct clk_hw *hw)
        return pll_locked;
 }
 
-static struct clk_ops hdmi_8996_pll_ops = {
+static const struct clk_ops hdmi_8996_pll_ops = {
        .set_rate = hdmi_8996_pll_set_clk_rate,
        .round_rate = hdmi_8996_pll_round_rate,
        .recalc_rate = hdmi_8996_pll_recalc_rate,
@@ -695,7 +695,7 @@ static const char * const hdmi_pll_parents[] = {
        "xo",
 };
 
-static struct clk_init_data pll_init = {
+static const struct clk_init_data pll_init = {
        .name = "hdmipll",
        .ops = &hdmi_8996_pll_ops,
        .parent_names = hdmi_pll_parents,