mtd: rawnand: mxc: remove __init qualifier from mxcnd_probe_dt
Using the sysfs unbind, bind nodes, mxcnd_probe and mxcnd_probe_dt can
potentially be called at any time. After the __init functions are cleaned,
mxcnd_probe_dt is no longer available. Calling it anyway causes a crash.
mxcnd_probe used to be marked as __init, this was removed years ago.
Remove the __init qualifier from from mxcnd_probe_dt as well.
Fixes: 06f2551069
("mtd: remove use of __devinit")
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:

committed by
Miquel Raynal

parent
3dfa025f89
commit
24f0ae995d
@@ -1686,7 +1686,7 @@ static const struct of_device_id mxcnd_dt_ids[] = {
|
|||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(of, mxcnd_dt_ids);
|
MODULE_DEVICE_TABLE(of, mxcnd_dt_ids);
|
||||||
|
|
||||||
static int __init mxcnd_probe_dt(struct mxc_nand_host *host)
|
static int mxcnd_probe_dt(struct mxc_nand_host *host)
|
||||||
{
|
{
|
||||||
struct device_node *np = host->dev->of_node;
|
struct device_node *np = host->dev->of_node;
|
||||||
const struct of_device_id *of_id =
|
const struct of_device_id *of_id =
|
||||||
@@ -1700,7 +1700,7 @@ static int __init mxcnd_probe_dt(struct mxc_nand_host *host)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static int __init mxcnd_probe_dt(struct mxc_nand_host *host)
|
static int mxcnd_probe_dt(struct mxc_nand_host *host)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user