mirror of
https://github.com/torvalds/linux.git
synced 2026-09-28 03:52:02 +02:00
soc: sunxi: sram: Const-ify sunxi_sram_func data and references
sunxi_sram_func contains value mapping that do not change at runtime. Const-ify them. Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://patch.msgid.link/20260324164357.1607247-4-wens@kernel.org Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
This commit is contained in:
parent
775c75e4ae
commit
7765752f52
|
|
@ -29,11 +29,11 @@ struct sunxi_sram_func {
|
|||
};
|
||||
|
||||
struct sunxi_sram_data {
|
||||
char *name;
|
||||
u8 reg;
|
||||
u8 offset;
|
||||
u8 width;
|
||||
struct sunxi_sram_func *func;
|
||||
char *name;
|
||||
u8 reg;
|
||||
u8 offset;
|
||||
u8 width;
|
||||
const struct sunxi_sram_func *func;
|
||||
};
|
||||
|
||||
struct sunxi_sram_desc {
|
||||
|
|
@ -54,7 +54,7 @@ struct sunxi_sram_desc {
|
|||
.reg = _reg, \
|
||||
.offset = _off, \
|
||||
.width = _width, \
|
||||
.func = (struct sunxi_sram_func[]){ \
|
||||
.func = (const struct sunxi_sram_func[]){ \
|
||||
__VA_ARGS__, { } }, \
|
||||
}
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ static int sunxi_sram_show(struct seq_file *s, void *data)
|
|||
struct device_node *sram_node, *section_node;
|
||||
const struct sunxi_sram_data *sram_data;
|
||||
const struct of_device_id *match;
|
||||
struct sunxi_sram_func *func;
|
||||
const struct sunxi_sram_func *func;
|
||||
const __be32 *sram_addr_p, *section_addr_p;
|
||||
u32 val;
|
||||
|
||||
|
|
@ -169,7 +169,7 @@ static const struct sunxi_sram_data *sunxi_sram_of_parse(struct device_node *nod
|
|||
{
|
||||
const struct of_device_id *match;
|
||||
const struct sunxi_sram_data *data;
|
||||
struct sunxi_sram_func *func;
|
||||
const struct sunxi_sram_func *func;
|
||||
struct of_phandle_args args;
|
||||
u8 val;
|
||||
int ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user