diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2018-02-27 23:22:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-28 12:00:27 -0500 |
commit | 1e9b9a8bbdbb7d472a2a203f658b38f0b2d99333 (patch) | |
tree | 12d708137480bfe8956c8fce8c0df49bc81c52ec | |
parent | 66e19689f57b61a2f347ea79c16c6b3cb92f090e (diff) | |
download | linux-1e9b9a8bbdbb7d472a2a203f658b38f0b2d99333.tar.bz2 |
net/macmace: Drop redundant MACH_IS_MAC test
The MACH_IS_MAC test is redundant here because the platform device
won't get registered unless MACH_IS_MAC.
Adopt module_platform_driver() convention.
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/apple/macmace.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c index cfd8f3d8a94c..137cbb470af2 100644 --- a/drivers/net/ethernet/apple/macmace.c +++ b/drivers/net/ethernet/apple/macmace.c @@ -767,18 +767,4 @@ static struct platform_driver mac_mace_driver = { }, }; -static int __init mac_mace_init_module(void) -{ - if (!MACH_IS_MAC) - return -ENODEV; - - return platform_driver_register(&mac_mace_driver); -} - -static void __exit mac_mace_cleanup_module(void) -{ - platform_driver_unregister(&mac_mace_driver); -} - -module_init(mac_mace_init_module); -module_exit(mac_mace_cleanup_module); +module_platform_driver(mac_mace_driver); |