diff options
author | Zoltan Herpai <wigyori@uid0.hu> | 2014-01-21 14:24:45 +0000 |
---|---|---|
committer | Zoltan Herpai <wigyori@uid0.hu> | 2014-01-21 14:24:45 +0000 |
commit | 4d26250db14675a693b1c3620749c68c2db669c2 (patch) | |
tree | 7b6d469ac71d1e2b686ad33340dfb243e7c694fc /target/linux | |
parent | a7a890d9e8c41bd69a65e09a46e162e524d5a5ba (diff) | |
download | upstream-4d26250db14675a693b1c3620749c68c2db669c2.tar.gz upstream-4d26250db14675a693b1c3620749c68c2db669c2.tar.bz2 upstream-4d26250db14675a693b1c3620749c68c2db669c2.zip |
modules: update swconfig.c to compile on 3.13 (compile-tested)
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
SVN-Revision: 39359
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/swconfig.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 <linux/skbuff.h> #include <linux/switch.h> #include <linux/of.h> +#include <linux/version.h> #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); |