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]
This commit is contained in:
Uwe Kleine-König authored and Miquel Raynal committed 2023-10-27 19:43:16 +02:00
1 parent 6dc597401c
commit 60ec53ace2
1 file changed
+2 -1
+2 -1
View File
@@ -1215,6 +1215,7 @@ static void flctl_remove(struct platform_device *pdev)
}
static struct platform_driver flctl_driver = {
.probe = flctl_probe,
.remove_new = flctl_remove,
.driver = {
.name = "sh_flctl",
@@ -1222,7 +1223,7 @@ static struct platform_driver flctl_driver = {
},
};
module_platform_driver_probe(flctl_driver, flctl_probe);
module_platform_driver(flctl_driver);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Yoshihiro Shimoda");