previous | start | next

Registering a Device

A module initialization function can register a device with:

      
 int register_chrdev(unsigned int major, const char *name, struct file_operations *fops);
      
   

Note that only the major number is passed. The kernel doesn't need to know the minor number.

Only the device driver functions need the minor number.



previous | start | next