[lkml]   [2003]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] dev_t [2/3]
    This is nice, thanks.  We don't have to touch the char drivers now.

Ah, I wish we could change that function to be:
int register_chrdev_region(major, num_minors, name, fops)
if it wasn't for the tty drivers wanting to start their minor at 64.

Hm, wait, why can't we just do it that way and not change the tty core
to use the register_chrdev_region() call? It should still all work
properly, right? The tty core would ask for 256 minors, and split them
off the same way it currently does.

# cat /proc/devices | head
Character devices:
1 mem
2 pty
3 ttyp
4 vc/0
4 vc/%d
4 ttyS%d
5 tty
5 console
5 ptmx

The routine tty_register_driver() already finds major, minor_start,
nr_of_minors in its struct tty_driver, so this is the natural,
or at least the easiest, interface to use.

"The tty core would ask for 256 minors" - this doesnt work
very well. One of the problems is that ttyS comes from a
serial module, while vc is virtual console stuff, unrelated.
If opening a device must load the module, then at registration time
we have to tell what minors belong to what module.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:34    [W:0.023 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site