Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
SVN-Revision: 39359
#include <linux/skbuff.h>
#include <linux/switch.h>
#include <linux/of.h>
+#include <linux/version.h>
#define SWCONFIG_DEVNAME "switch%d"
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;
}
return 0;
+#else
+ err = genl_register_family_with_ops(&switch_fam, swconfig_ops);
+ if (err)
+ goto unregister;
+#endif
unregister:
genl_unregister_family(&switch_fam);