net/macmace: Drop redundant MACH_IS_MAC test
authorFinn Thain <fthain@telegraphics.com.au>
Wed, 28 Feb 2018 04:22:33 +0000 (23:22 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Feb 2018 17:00:27 +0000 (12:00 -0500)
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>
drivers/net/ethernet/apple/macmace.c

index cfd8f3d8a94cdf46f03955e8ee09bea2d0c57368..137cbb470af2301b83864901332d794dcaa6f9b5 100644 (file)
@@ -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);