I was just reading The Linux Kernel Module Programming Guide and and got stuck on character device drivers example.
Makefiles for previous examples were provided, but no
actually driver gets loaded by the macro MODULE_INIT(my_init); here "my_init" can be the user specified function and MUDULE_EXIT(my_cleanup); here my_exit can be the user specified function . those two macros are missing in the above code.
Makefile: the obj-m += chardev.o is to be replaced with obj-m := chardev.o.
I am also a beginner to LLD. If any mistake is there please let me know.