Re: [PATCH 2/2] RFC: chrdev: allocate chardevs in all unused holes

2016-02-20 Thread Linus Torvalds
On Fri, Feb 19, 2016 at 6:36 AM, Linus Walleij 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

[PATCH 2/2] RFC: chrdev: allocate chardevs in all unused holes

2016-02-19 Thread Linus Walleij
This is a duct-tape-and-chewing-gum solution to the problem with the major numbers running out when allocating major numbers dynamically. To avoid collissions in the major space, we supply a list of "holes" that exist in the lower range of major numbers [0-254] and pick numbers from there once the