From 49282f8e3f0a54e7e60babc9c24e1c3e0741f450 Mon Sep 17 00:00:00 2001 From: Zoltan Herpai Date: Tue, 21 Jan 2014 14:24:45 +0000 Subject: [PATCH] modules: update swconfig.c to compile on 3.13 (compile-tested) Signed-off-by: Zoltan HERPAI SVN-Revision: 39359 --- target/linux/generic/files/drivers/net/phy/swconfig.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c index 03db7a6ffa..c30deb9fd1 100644 --- a/target/linux/generic/files/drivers/net/phy/swconfig.c +++ b/target/linux/generic/files/drivers/net/phy/swconfig.c @@ -24,6 +24,7 @@ #include #include #include +#include #define SWCONFIG_DEVNAME "switch%d" @@ -1109,6 +1110,8 @@ swconfig_init(void) int i, err; INIT_LIST_HEAD(&swdevs); + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)) err = genl_register_family(&switch_fam); if (err) return err; @@ -1120,6 +1123,11 @@ swconfig_init(void) } return 0; +#else + err = genl_register_family_with_ops(&switch_fam, swconfig_ops); + if (err) + goto unregister; +#endif unregister: genl_unregister_family(&switch_fam); -- 2.30.2