hello-4.c 531 B

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