prp_main.c 1000 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * prp_main.c: hsr initialization code. This is based on hsr_main.c
  3. *
  4. * Copyright (C) 2017 Texas Instruments Incorporated
  5. *
  6. * Author(s):
  7. * Murali Karicheri <m-karicheri2@ti.com>
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation version 2.
  12. *
  13. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  14. * kind, whether express or implied; without even the implied warranty
  15. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. */
  18. #include <linux/netdevice.h>
  19. #include "hsr_prp_main.h"
  20. #include "prp_netlink.h"
  21. static int __init prp_init(void)
  22. {
  23. int res;
  24. res = hsr_prp_register_notifier(PRP);
  25. if (!res)
  26. res = prp_netlink_init();
  27. return res;
  28. }
  29. static void __exit prp_exit(void)
  30. {
  31. hsr_prp_unregister_notifier(PRP);
  32. prp_netlink_exit();
  33. }
  34. module_init(prp_init);
  35. MODULE_LICENSE("GPL");