E5.1 Q2


with regards to the first Q about Ex5.1

when do we use register_chrdev_region?


when do we use alloc_chrdev_region?

Asked on September 28, 2019 in Linux.
Add Comment
2 Answer(s)
Best answer

you should not use register_chrdev_region and you should use alloc_chrdev_region instead, unless you want to check manually which major number is free to use, then you can use register_chrdev_region  instead alloc_chrdev_region.

Answered on September 28, 2019.
Add Comment

As Adi concludes

register_chrdev_region should only be used if you have a specific MAJOR number  you want to use.

Answered on September 29, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.