Skip to content

Commit 5a72122

Browse files
rikardfalkebornvinodkoul
authored andcommitted
phy: ti: j721e-wiz: Constify structs
clk_div_table and wiz_regmap_config are not modified and can therefore be made const to allow the compiler to put them in read-only memory. Before: text data bss dec hex filename 20265 7044 64 27373 6aed drivers/phy/ti/phy-j721e-wiz.o After: text data bss dec hex filename 20649 6660 64 27373 6aed drivers/phy/ti/phy-j721e-wiz.o Signed-off-by: Rikard Falkeborn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 0cb5ebc commit 5a72122

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/phy/ti/phy-j721e-wiz.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ struct wiz_clk_mux {
117117
struct wiz_clk_divider {
118118
struct clk_hw hw;
119119
struct regmap_field *field;
120-
struct clk_div_table *table;
120+
const struct clk_div_table *table;
121121
struct clk_init_data clk_data;
122122
};
123123

@@ -131,7 +131,7 @@ struct wiz_clk_mux_sel {
131131

132132
struct wiz_clk_div_sel {
133133
struct regmap_field *field;
134-
struct clk_div_table *table;
134+
const struct clk_div_table *table;
135135
const char *node_name;
136136
};
137137

@@ -173,7 +173,7 @@ static struct wiz_clk_mux_sel clk_mux_sel_10g[] = {
173173
},
174174
};
175175

176-
static struct clk_div_table clk_div_table[] = {
176+
static const struct clk_div_table clk_div_table[] = {
177177
{ .val = 0, .div = 1, },
178178
{ .val = 1, .div = 2, },
179179
{ .val = 2, .div = 4, },
@@ -559,7 +559,7 @@ static const struct clk_ops wiz_clk_div_ops = {
559559

560560
static int wiz_div_clk_register(struct wiz *wiz, struct device_node *node,
561561
struct regmap_field *field,
562-
struct clk_div_table *table)
562+
const struct clk_div_table *table)
563563
{
564564
struct device *dev = wiz->dev;
565565
struct wiz_clk_divider *div;
@@ -756,7 +756,7 @@ static const struct reset_control_ops wiz_phy_reset_ops = {
756756
.deassert = wiz_phy_reset_deassert,
757757
};
758758

759-
static struct regmap_config wiz_regmap_config = {
759+
static const struct regmap_config wiz_regmap_config = {
760760
.reg_bits = 32,
761761
.val_bits = 32,
762762
.reg_stride = 4,

0 commit comments

Comments
 (0)