Messages in this thread |  | | Date | Sat, 20 Feb 2016 13:36:09 -0800 | Subject | Re: [PATCH 2/2] RFC: chrdev: allocate chardevs in all unused holes | From | Linus Torvalds <> |
| |
On Fri, Feb 19, 2016 at 6:36 AM, Linus Walleij <linus.walleij@linaro.org> wrote: > This is a duct-tape-and-chewing-gum solution to the problem with > the major numbers running out when allocating major numbers > dynamically.
Ugh. This is too ugly to live.
Can't you do something with a simple bitmap, and just pre-allocate the fixed numbers? Allocate new major numbers using find_next_zero_bit() or something..
I can't imagine that we couldn't do something prettier in less code than that too-disgusting-to-live free_majors[] array..
Linus
|  |