Commit 11b345ab authored by Chen-Yu Tsai's avatar Chen-Yu Tsai Committed by Marc Zyngier

irqchip/sunxi-nmi: Const-ify sunxi_sc_nmi_reg_offs structures

The sunxi_sc_nmi_reg_offs, which hold the register offsets for the
various variants, is never modified, and only used at init time within
the init functions referenced by IRQCHIP_DECLARE, which themselves are
tagged __init.

Const-ify the sunxi_sc_nmi_reg_offs structures, and tag them as
__initconst.
Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent c81a2480
...@@ -52,19 +52,19 @@ struct sunxi_sc_nmi_reg_offs { ...@@ -52,19 +52,19 @@ struct sunxi_sc_nmi_reg_offs {
u32 enable; u32 enable;
}; };
static struct sunxi_sc_nmi_reg_offs sun6i_reg_offs = { static const struct sunxi_sc_nmi_reg_offs sun6i_reg_offs __initconst = {
.ctrl = SUN6I_NMI_CTRL, .ctrl = SUN6I_NMI_CTRL,
.pend = SUN6I_NMI_PENDING, .pend = SUN6I_NMI_PENDING,
.enable = SUN6I_NMI_ENABLE, .enable = SUN6I_NMI_ENABLE,
}; };
static struct sunxi_sc_nmi_reg_offs sun7i_reg_offs = { static const struct sunxi_sc_nmi_reg_offs sun7i_reg_offs __initconst = {
.ctrl = SUN7I_NMI_CTRL, .ctrl = SUN7I_NMI_CTRL,
.pend = SUN7I_NMI_PENDING, .pend = SUN7I_NMI_PENDING,
.enable = SUN7I_NMI_ENABLE, .enable = SUN7I_NMI_ENABLE,
}; };
static struct sunxi_sc_nmi_reg_offs sun9i_reg_offs = { static const struct sunxi_sc_nmi_reg_offs sun9i_reg_offs __initconst = {
.ctrl = SUN9I_NMI_CTRL, .ctrl = SUN9I_NMI_CTRL,
.pend = SUN9I_NMI_PENDING, .pend = SUN9I_NMI_PENDING,
.enable = SUN9I_NMI_ENABLE, .enable = SUN9I_NMI_ENABLE,
...@@ -142,7 +142,7 @@ static int sunxi_sc_nmi_set_type(struct irq_data *data, unsigned int flow_type) ...@@ -142,7 +142,7 @@ static int sunxi_sc_nmi_set_type(struct irq_data *data, unsigned int flow_type)
} }
static int __init sunxi_sc_nmi_irq_init(struct device_node *node, static int __init sunxi_sc_nmi_irq_init(struct device_node *node,
struct sunxi_sc_nmi_reg_offs *reg_offs) const struct sunxi_sc_nmi_reg_offs *reg_offs)
{ {
struct irq_domain *domain; struct irq_domain *domain;
struct irq_chip_generic *gc; struct irq_chip_generic *gc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment