Get name of kernel module in Driver Code - KBUILD_MODNAME

Kernel build system defines KBUILD_MODNAME automatically from each Makefile.

Following is the sample code which prints the name of module when loaded and unloaded.


Ouptut:


Comments

Popular posts from this blog

Appending and Prepending in Yocto - +=, =+ vs .=, =.

Linux driver example for Per CPU Variable

ARM interview questions