This allows the probe function to be dropped after the kernel finished its initialization, in the case where the driver was not compiled as a module. Signed-off-by: Paul Cercueil <paul@xxxxxxxxxxxxxxx> --- drivers/mtd/nand/raw/ingenic/ingenic_nand.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nand/raw/ingenic/ingenic_nand.c b/drivers/mtd/nand/raw/ingenic/ingenic_nand.c index d7b7c0f13909..b7f2facb4b37 100644 --- a/drivers/mtd/nand/raw/ingenic/ingenic_nand.c +++ b/drivers/mtd/nand/raw/ingenic/ingenic_nand.c @@ -302,7 +302,7 @@ static const struct nand_controller_ops ingenic_nand_controller_ops = { .attach_chip = ingenic_nand_attach_chip, }; -static int ingenic_nand_init_chip(struct platform_device *pdev, +static int __init_or_module ingenic_nand_init_chip(struct platform_device *pdev, struct ingenic_nfc *nfc, struct device_node *np, unsigned int chipnr) @@ -399,7 +399,7 @@ static void ingenic_nand_cleanup_chips(struct ingenic_nfc *nfc) } } -static int ingenic_nand_init_chips(struct ingenic_nfc *nfc, +static int __init_or_module ingenic_nand_init_chips(struct ingenic_nfc *nfc, struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -427,7 +427,7 @@ static int ingenic_nand_init_chips(struct ingenic_nfc *nfc, return 0; } -static int ingenic_nand_probe(struct platform_device *pdev) +static int __init_or_module ingenic_nand_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; unsigned int num_banks; @@ -473,7 +473,7 @@ static int ingenic_nand_probe(struct platform_device *pdev) return 0; } -static int ingenic_nand_remove(struct platform_device *pdev) +static int __exit ingenic_nand_remove(struct platform_device *pdev) { struct ingenic_nfc *nfc = platform_get_drvdata(pdev); -- 2.21.0.593.g511ec345e18 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/