diff --git a/drivers/amlogic/clk/clkc.h b/drivers/amlogic/clk/clkc.h index 72dec81187cb..f83706568784 100644 --- a/drivers/amlogic/clk/clkc.h +++ b/drivers/amlogic/clk/clkc.h @@ -33,7 +33,7 @@ #define MESON_PARM_APPLICABLE(p) (!!((p)->width)) #define PNAME(x) \ -static const char *x[] __initconst +static const char *x[] struct parm { u16 reg_off; diff --git a/drivers/amlogic/ddr_tool/ddr_bandwidth.c b/drivers/amlogic/ddr_tool/ddr_bandwidth.c index 8b8f9d7ca352..002c6fa92cb1 100644 --- a/drivers/amlogic/ddr_tool/ddr_bandwidth.c +++ b/drivers/amlogic/ddr_tool/ddr_bandwidth.c @@ -241,7 +241,12 @@ static struct class aml_ddr_class = { .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