PD#164617: section mismatch warning
When a variable or function with __initxxx anotation refers a
variable or function without it, there will be a section mismatch
warning.
In such case, memory belong to the latter will be released after
kernel booting up, if the former still refers the latter, strange
things happens
So we have to use __initxxx anotations correctly or add __refxxx
anotations to teach modpost that it is okay and save to use __init
anotations in this way.
Change-Id: Ic97dac8998b2a01c82dd7a3bae12fa9c7a113bc4
Signed-off-by: jiamin ma <jiamin.ma@amlogic.com>
#define MESON_PARM_APPLICABLE(p) (!!((p)->width))
#define PNAME(x) \
-static const char *x[] __initconst
+static const char *x[]
struct parm {
u16 reg_off;
.class_attrs = aml_ddr_tool_attr,
};
-static int ddr_bandwidth_probe(struct platform_device *pdev)
+/*
+ * ddr_bandwidth_probe only executes before the init process starts
+ * to run, so add __ref to indicate it is okay to call __init function
+ * ddr_find_port_desc
+ */
+static int __ref ddr_bandwidth_probe(struct platform_device *pdev)
{
int r = 0;
#ifdef CONFIG_OF