Skip to contentSkip to conversation

Dynamic allocation of char majors in the new world order

DISCUSSION Jonathan Corbet 1 participant 1 message Sep 17, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines · Yesterday I done

The new register_chrdev_region() and cdev_* functions are reasonably easy to get a grasp of, for the most part. But I'm curious about one thing:
what do you do if you want to use the new functions with dynamic major number allocation?

Well, I'm a little slow, but it is possible for things to seep into my brain eventually. Further review of the source makes it clear that the dynamic allocation case is what alloc_chrdev_region() is for.

Look for a new article in the driver porting series shortly...

jon

Jonathan Corbet
Executive editor, LWN.net
[email protected]