Skip to content

Commit 60ec53a

Browse files
Uwe Kleine-Königmiquelraynal
authored andcommitted
mtd: rawnand: sh_flctl: Convert to module_platform_driver()
The driver doesn't benefit from the advantages that module_platform_driver_probe() allows (i.e. putting the probe function in .init.text and the .remove function into .exit.text). So use module_platform_driver() instead which allows to bind the driver also after booting (or module loading) and unbinding via sysfs. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent 6dc5974 commit 60ec53a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/mtd/nand/raw/sh_flctl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,14 +1215,15 @@ static void flctl_remove(struct platform_device *pdev)
12151215
}
12161216

12171217
static struct platform_driver flctl_driver = {
1218+
.probe = flctl_probe,
12181219
.remove_new = flctl_remove,
12191220
.driver = {
12201221
.name = "sh_flctl",
12211222
.of_match_table = of_flctl_match,
12221223
},
12231224
};
12241225

1225-
module_platform_driver_probe(flctl_driver, flctl_probe);
1226+
module_platform_driver(flctl_driver);
12261227

12271228
MODULE_LICENSE("GPL v2");
12281229
MODULE_AUTHOR("Yoshihiro Shimoda");

0 commit comments

Comments
 (0)