What does using 0 as the primary device number mean? I tried 0; the device does not appear in /dev, but it is indicated in /proc/devices.
/dev
/proc/devices
I created a char device with register_chrdev:
register_chrdev
register_chrdev(0, DEVICE_NAME, &char_fops);
Passing 0means that you allow register_chrdev () to choose a dynamic number.
0
In this case, the function will return this number instead 0.