Skip to content

Commit 7a4541a

Browse files
fabio-porceddagregkh
authored andcommitted
drivers: memory: use module_platform_driver_probe()
This patch converts the drivers to use the module_platform_driver_probe() macro which makes the code smaller and a bit simpler. Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Benoit Cousson <b-cousson@ti.com> Cc: Aneesh V <aneesh@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 61084d9 commit 7a4541a

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

‎drivers/memory/emif.c‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,18 +1841,8 @@ static struct platform_driver emif_driver = {
18411841
},
18421842
};
18431843

1844-
static int __init_or_module emif_register(void)
1845-
{
1846-
return platform_driver_probe(&emif_driver, emif_probe);
1847-
}
1848-
1849-
static void __exit emif_unregister(void)
1850-
{
1851-
platform_driver_unregister(&emif_driver);
1852-
}
1844+
module_platform_driver_probe(emif_driver, emif_probe);
18531845

1854-
module_init(emif_register);
1855-
module_exit(emif_unregister);
18561846
MODULE_DESCRIPTION("TI EMIF SDRAM Controller Driver");
18571847
MODULE_LICENSE("GPL");
18581848
MODULE_ALIAS("platform:emif");

0 commit comments

Comments
 (0)