diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2014-05-08 21:52:19 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2014-05-08 21:52:19 +0000 |
commit | 5e451f462b45d68126742a025b72bf5b2e7de97e (patch) | |
tree | c5edbb904ab3d1d9319680c964647214d5f82713 /target/linux/generic | |
parent | 5e4a3e57db5a185f65d0633182d5eea57da8f3c4 (diff) | |
download | upstream-5e451f462b45d68126742a025b72bf5b2e7de97e.tar.gz upstream-5e451f462b45d68126742a025b72bf5b2e7de97e.tar.bz2 upstream-5e451f462b45d68126742a025b72bf5b2e7de97e.zip |
kernel: fix warning in swconfig.c with kernel 3.14
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@40733 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/swconfig.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c index c043ee4649..ba9136c34f 100644 --- a/target/linux/generic/files/drivers/net/phy/swconfig.c +++ b/target/linux/generic/files/drivers/net/phy/swconfig.c @@ -1107,7 +1107,10 @@ EXPORT_SYMBOL_GPL(unregister_switch); static int __init swconfig_init(void) { - int i, err; + int err; +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)) + int i; +#endif INIT_LIST_HEAD(&swdevs); @@ -1121,16 +1124,17 @@ swconfig_init(void) if (err) goto unregister; } -#else - err = genl_register_family_with_ops(&switch_fam, swconfig_ops); - if (err) - return err; -#endif 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 |