Commit 41ab724a authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Grant Likely

spi/orion: Use module_platform_driver()

This patch reduces and simplifies initalization code by
using module_platform_driver().
With this change it's necessary to remove the __init annotation
to avoid section mismatch warnings.
Signed-off-by: default avatarEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent c0fde3ba
...@@ -513,20 +513,11 @@ static struct platform_driver orion_spi_driver = { ...@@ -513,20 +513,11 @@ static struct platform_driver orion_spi_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.of_match_table = of_match_ptr(orion_spi_of_match_table), .of_match_table = of_match_ptr(orion_spi_of_match_table),
}, },
.probe = orion_spi_probe,
.remove = orion_spi_remove, .remove = orion_spi_remove,
}; };
static int __init orion_spi_init(void) module_platform_driver(orion_spi_driver);
{
return platform_driver_probe(&orion_spi_driver, orion_spi_probe);
}
module_init(orion_spi_init);
static void __exit orion_spi_exit(void)
{
platform_driver_unregister(&orion_spi_driver);
}
module_exit(orion_spi_exit);
MODULE_DESCRIPTION("Orion SPI driver"); MODULE_DESCRIPTION("Orion SPI driver");
MODULE_AUTHOR("Shadi Ammouri <shadi@marvell.com>"); MODULE_AUTHOR("Shadi Ammouri <shadi@marvell.com>");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment