diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-06-05 18:54:35 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-06-05 18:54:35 -0700 |
| commit | 7807eb6a554acb160137101afa71ebb81ac9c115 (patch) | |
| tree | e248057cbac22aac2052a2ac2e3328f25bb4ea54 /drivers/serial | |
| parent | 9c481bc054a2031234c8d0e43566133d9c627b0a (diff) | |
[PATCH] Fix tty devfs mess
From: Christoph Hellwig <hch@lst.de>
Currently the tty code abuses tty_driver.name as the prefix for the devfs
names of the ttys. This is a very bad idea because it means the tty name
changes depending on whether devfs is enabled or not, leading to different
names in /proc/tty/ depending on whether we have devfs or not (and not
whether it actually is mounted!) and a huge amount of ifdefs.
The patch below adds a .devfs_name member instead, similar to the block
device changes a few weeks ago.
Diffstat (limited to 'drivers/serial')
| -rw-r--r-- | drivers/serial/8250.c | 5 | ||||
| -rw-r--r-- | drivers/serial/core.c | 1 | ||||
| -rw-r--r-- | drivers/serial/nb85e_uart.c | 5 | ||||
| -rw-r--r-- | drivers/serial/sunsab.c | 5 | ||||
| -rw-r--r-- | drivers/serial/sunsu.c | 5 | ||||
| -rw-r--r-- | drivers/serial/sunzilog.c | 5 |
6 files changed, 6 insertions, 20 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index b554e894f79d..5aa42b8842ec 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -1999,11 +1999,8 @@ console_initcall(serial8250_console_init); static struct uart_driver serial8250_reg = { .owner = THIS_MODULE, .driver_name = "serial", -#ifdef CONFIG_DEVFS_FS - .dev_name = "tts/", -#else + .devfs_name = "tts/", .dev_name = "ttyS", -#endif .major = TTY_MAJOR, .minor = 64, .nr = UART_NR, diff --git a/drivers/serial/core.c b/drivers/serial/core.c index 3df5db0c4a59..7a40034c9cb7 100644 --- a/drivers/serial/core.c +++ b/drivers/serial/core.c @@ -2115,6 +2115,7 @@ int uart_register_driver(struct uart_driver *drv) normal->magic = TTY_DRIVER_MAGIC; normal->owner = drv->owner; normal->driver_name = drv->driver_name; + normal->devfs_name = drv->devfs_name; normal->name = drv->dev_name; normal->major = drv->major; normal->minor_start = drv->minor; diff --git a/drivers/serial/nb85e_uart.c b/drivers/serial/nb85e_uart.c index 1d9da1d786d4..883be05241df 100644 --- a/drivers/serial/nb85e_uart.c +++ b/drivers/serial/nb85e_uart.c @@ -524,11 +524,8 @@ static struct uart_ops nb85e_uart_ops = { static struct uart_driver nb85e_uart_driver = { .owner = THIS_MODULE, .driver_name = "nb85e_uart", -#ifdef CONFIG_DEVFS_FS - .dev_name = "tts/", -#else + .devfs_name = "tts/", .dev_name = "ttyS", -#endif .major = TTY_MAJOR, .minor = NB85E_UART_MINOR_BASE, .nr = NB85E_UART_NUM_CHANNELS, diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index 3825912884ae..f69dccdfc530 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c @@ -830,11 +830,8 @@ static struct uart_ops sunsab_pops = { static struct uart_driver sunsab_reg = { .owner = THIS_MODULE, .driver_name = "serial", -#ifdef CONFIG_DEVFS_FS - .dev_name = "tts/", -#else + .devfs_name = "tts/", .dev_name = "ttyS", -#endif .major = TTY_MAJOR, }; diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 91c3b6233d42..8a42e34130f5 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c @@ -1285,11 +1285,8 @@ out: static struct uart_driver sunsu_reg = { .owner = THIS_MODULE, .driver_name = "serial", -#ifdef CONFIG_DEVFS_FS - .dev_name = "tts/", -#else + .devfs_name = "tts/", .dev_name = "ttyS", -#endif .major = TTY_MAJOR, }; diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index d91ae7dd5b27..8a5bcd6e19b3 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c @@ -1030,11 +1030,8 @@ static int zilog_irq = -1; static struct uart_driver sunzilog_reg = { .owner = THIS_MODULE, .driver_name = "ttyS", -#ifdef CONFIG_DEVFS_FS - .dev_name = "tts/", -#else + .devfs_name = "tts/", .dev_name = "ttyS", -#endif .major = TTY_MAJOR, }; |
