hello-4.c 572 B

12345678910111213141516171819202122232425
  1. /*
  2. * hello-4.c - Demonstrates module documentation.
  3. */
  4. #include <linux/init.h> /* Needed for the macros */
  5. #include <linux/kernel.h> /* Needed for KERN_INFO */
  6. #include <linux/module.h> /* Needed by all modules */
  7. MODULE_LICENSE("GPL");
  8. MODULE_AUTHOR("LKMPG");
  9. MODULE_DESCRIPTION("A sample driver");
  10. MODULE_SUPPORTED_DEVICE("testdevice");
  11. static int __init init_hello_4(void)
  12. {
  13. pr_info("Hello, world 4\n");
  14. return 0;
  15. }
  16. static void __exit cleanup_hello_4(void)
  17. {
  18. pr_info("Goodbye, world 4\n");
  19. }
  20. module_init(init_hello_4);
  21. module_exit(cleanup_hello_4);