net: encx24j600: use module_spi_driver to simplify the code
Subsystems (3)
PATCH 1/1 net: encx24j600: use module_spi_driver to simplify the code
module_spi_driver() makes the code simpler by eliminating boilerplate code.
Signed-off-by Wei Yongjun <[email protected]>
--- .../net/ethernet/microchip/encx24j600.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
drivers/net/ethernet/microchip/encx24j600.c +1 -11
@@ -1117,17 +1117,7 @@ static struct spi_driver encx24j600_spi_net_driver = { .id_table = encx24j600_spi_id_table, }; -static int __init encx24j600_init (void ) -{ -return spi_register_driver (&encx24j600_spi_net_driver); -} -module_init (encx24j600_init); - -static void encx24j600_exit (void ) -{ -spi_unregister_driver (&encx24j600_spi_net_driver); -} -module_exit (encx24j600_exit); +module_spi_driver (encx24j600_spi_net_driver);MODULE_DESCRIPTION (DRV_NAME " ethernet driver" );MODULE_AUTHOR ("Jon Ringle <[email protected]>" );
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 7 lines · On Wed, 7 Apr 2021 15:07:04 +0000 you wrote:
module_spi_driver()makes the code simpler by eliminating boilerplate code.Signed-off-by Wei Yongjun <[email protected]>--- .../net/ethernet/microchip/encx24j600.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
Here is the summary with links:
- [net-next] net: encx24j600: use module_spi_driver to simplify the code
https://git.kernel.org/netdev/net-next/c/4e92cac843d3
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html