Re: How do I choose an arbitrary minor number for my tty device?

From: Alan Cox
Date: Thu Nov 18 2010 - 16:00:03 EST


> for (i = 0; i < num_byte_channels; i++) {
> bc->handle = get_the_byte_channel_handle(i);
> ehv_bc_driver->name_base = bc->handle - i;
> tty_register_device(ehv_bc_driver, i, NULL);
> }
>
> This actually works and does what I want, but I seriously doubt it's acceptable.
> When I do this, I get:
>
> # ls -l /dev/ttyEH*
> crw-rw---- 1 root uucp 253, 0 Jan 1 00:00 /dev/ttyEHV73
> crw-rw---- 1 root uucp 253, 1 Jan 1 00:00 /dev/ttyEHV76
> crw-rw---- 1 root uucp 253, 2 Jan 1 00:00 /dev/ttyEHV79

Which looks the right approach to me.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/