Author: jogo
Date: 2016-01-24 13:35:59 +0100 (Sun, 24 Jan 2016)
New Revision: 48471

Modified:
   trunk/target/linux/generic/files/drivers/net/phy/swconfig.c
Log:
swconfig: drop linux < 3.13 code paths

The oldest kernel we support is 3.18, no need to keep code paths
for older kernels.

Signed-off-by: Jonas Gorski <[email protected]>

Modified: trunk/target/linux/generic/files/drivers/net/phy/swconfig.c
===================================================================
--- trunk/target/linux/generic/files/drivers/net/phy/swconfig.c 2016-01-24 
00:16:36 UTC (rev 48470)
+++ trunk/target/linux/generic/files/drivers/net/phy/swconfig.c 2016-01-24 
12:35:59 UTC (rev 48471)
@@ -1173,33 +1173,13 @@
 swconfig_init(void)
 {
        int err;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0))
-       int i;
-#endif
 
        INIT_LIST_HEAD(&swdevs);
        
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0))
-       err = genl_register_family(&switch_fam);
-       if (err)
-               return err;
-
-       for (i = 0; i < ARRAY_SIZE(swconfig_ops); i++) {
-               err = genl_register_ops(&switch_fam, &swconfig_ops[i]);
-               if (err)
-                       goto unregister;
-       }
-       return 0;
-
-unregister:
-       genl_unregister_family(&switch_fam);
-       return err;
-#else
        err = genl_register_family_with_ops(&switch_fam, swconfig_ops);
        if (err)
                return err;
        return 0;
-#endif
 }
 
 static void __exit
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to