Skip to content

Commit dc54326

Browse files
rikardfalkebornbebarino
authored andcommitted
clk: bcm2835: Constify struct debugfs_reg32
bcm2835_debugfs_clock_reg32 is never changed and can therefore be made const. This allows the compiler to put it in the text section instead of the data section. Before: text data bss dec hex filename 26598 16088 64 42750 a6fe drivers/clk/bcm/clk-bcm2835.o After: text data bss dec hex filename 26662 16024 64 42750 a6fe drivers/clk/bcm/clk-bcm2835.o Signed-off-by: Rikard Falkeborn <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 99a1ae2 commit dc54326

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/clk/bcm/clk-bcm2835.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ static unsigned long bcm2835_measure_tcnt_mux(struct bcm2835_cprman *cprman,
396396
}
397397

398398
static void bcm2835_debugfs_regset(struct bcm2835_cprman *cprman, u32 base,
399-
struct debugfs_reg32 *regs, size_t nregs,
400-
struct dentry *dentry)
399+
const struct debugfs_reg32 *regs,
400+
size_t nregs, struct dentry *dentry)
401401
{
402402
struct debugfs_regset32 *regset;
403403

@@ -1240,7 +1240,7 @@ static u8 bcm2835_clock_get_parent(struct clk_hw *hw)
12401240
return (src & CM_SRC_MASK) >> CM_SRC_SHIFT;
12411241
}
12421242

1243-
static struct debugfs_reg32 bcm2835_debugfs_clock_reg32[] = {
1243+
static const struct debugfs_reg32 bcm2835_debugfs_clock_reg32[] = {
12441244
{
12451245
.name = "ctl",
12461246
.offset = 0,

0 commit comments

Comments
 (0)