Commit b1a2c31d authored by Russell King's avatar Russell King

[SERIAL] Fix up formatting of serial names

The tty layer's tty_name requires formatting codes in driver->name
for the devfs and non-devfs cases.
parent 31efb7f7
...@@ -485,11 +485,7 @@ void __init rs285_console_init(void) ...@@ -485,11 +485,7 @@ void __init rs285_console_init(void)
static struct uart_driver serial21285_reg = { static struct uart_driver serial21285_reg = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.driver_name = "ttyFB", .driver_name = "ttyFB",
#ifdef CONFIG_DEVFS_FS
.dev_name = "ttyFB%d", .dev_name = "ttyFB%d",
#else
.dev_name = "ttyFB",
#endif
.major = SERIAL_21285_MAJOR, .major = SERIAL_21285_MAJOR,
.minor = SERIAL_21285_MINOR, .minor = SERIAL_21285_MINOR,
.nr = 1, .nr = 1,
......
...@@ -1866,7 +1866,7 @@ static struct uart_driver serial8250_reg = { ...@@ -1866,7 +1866,7 @@ static struct uart_driver serial8250_reg = {
#ifdef CONFIG_DEVFS_FS #ifdef CONFIG_DEVFS_FS
.dev_name = "tts/%d", .dev_name = "tts/%d",
#else #else
.dev_name = "ttyS", .dev_name = "ttyS%d",
#endif #endif
.major = TTY_MAJOR, .major = TTY_MAJOR,
.minor = 64, .minor = 64,
......
...@@ -706,11 +706,7 @@ void __init ambauart_console_init(void) ...@@ -706,11 +706,7 @@ void __init ambauart_console_init(void)
static struct uart_driver amba_reg = { static struct uart_driver amba_reg = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.driver_name = "ttyAM", .driver_name = "ttyAM",
#ifdef CONFIG_DEVFS_FS
.dev_name = "ttyAM%d", .dev_name = "ttyAM%d",
#else
.dev_name = "ttyAM",
#endif
.major = SERIAL_AMBA_MAJOR, .major = SERIAL_AMBA_MAJOR,
.minor = SERIAL_AMBA_MINOR, .minor = SERIAL_AMBA_MINOR,
.nr = UART_NR, .nr = UART_NR,
......
...@@ -50,14 +50,12 @@ ...@@ -50,14 +50,12 @@
#define UART_NR 2 #define UART_NR 2
#ifndef CONFIG_SERIAL_CLPS711X_OLD_NAME #ifndef CONFIG_SERIAL_CLPS711X_OLD_NAME
#define SERIAL_CLPS711X_NAME "ttyCL"
#define SERIAL_CLPS711X_MAJOR 204 #define SERIAL_CLPS711X_MAJOR 204
#define SERIAL_CLPS711X_MINOR 40 #define SERIAL_CLPS711X_MINOR 40
#define SERIAL_CLPS711X_NR UART_NR #define SERIAL_CLPS711X_NR UART_NR
#else #else
#warning The old names/device number for this driver if compatabity is needed #warning The old names/device number for this driver if compatabity is needed
#define SERIAL_CLPS711X_NAME "ttyAM"
#define SERIAL_CLPS711X_MAJOR 204 #define SERIAL_CLPS711X_MAJOR 204
#define SERIAL_CLPS711X_MINOR 16 #define SERIAL_CLPS711X_MINOR 16
#define SERIAL_CLPS711X_NR UART_NR #define SERIAL_CLPS711X_NR UART_NR
...@@ -545,7 +543,7 @@ static int __init clps711xuart_console_setup(struct console *co, char *options) ...@@ -545,7 +543,7 @@ static int __init clps711xuart_console_setup(struct console *co, char *options)
} }
static struct console clps711x_console = { static struct console clps711x_console = {
.name = SERIAL_CLPS711X_NAME, .name = "ttyCL",
.write = clps711xuart_console_write, .write = clps711xuart_console_write,
.device = clps711xuart_console_device, .device = clps711xuart_console_device,
.setup = clps711xuart_console_setup, .setup = clps711xuart_console_setup,
...@@ -565,12 +563,7 @@ void __init clps711xuart_console_init(void) ...@@ -565,12 +563,7 @@ void __init clps711xuart_console_init(void)
static struct uart_driver clps711x_reg = { static struct uart_driver clps711x_reg = {
.driver_name = "ttyCL", .driver_name = "ttyCL",
#ifdef CONFIG_DEVFS_FS .dev_name = "ttyCL%d",
.dev_name = SERIAL_CLPS711X_NAME,
#else
.dev_name = SERIAL_CLPS711X_NAME,
#endif
.major = SERIAL_CLPS711X_MAJOR, .major = SERIAL_CLPS711X_MAJOR,
.minor = SERIAL_CLPS711X_MINOR, .minor = SERIAL_CLPS711X_MINOR,
.nr = UART_NR, .nr = UART_NR,
......
...@@ -1981,7 +1981,8 @@ static int uart_pm(struct pm_dev *dev, pm_request_t rqst, void *data) ...@@ -1981,7 +1981,8 @@ static int uart_pm(struct pm_dev *dev, pm_request_t rqst, void *data)
static inline void static inline void
uart_report_port(struct uart_driver *drv, struct uart_port *port) uart_report_port(struct uart_driver *drv, struct uart_port *port)
{ {
printk("%s%d at ", drv->dev_name, port->line); printk(drv->dev_name, port->line);
printk(" at ");
switch (port->iotype) { switch (port->iotype) {
case UPIO_PORT: case UPIO_PORT:
printk("I/O 0x%x", port->iobase); printk("I/O 0x%x", port->iobase);
...@@ -2439,8 +2440,9 @@ void uart_unregister_port(struct uart_driver *drv, int line) ...@@ -2439,8 +2440,9 @@ void uart_unregister_port(struct uart_driver *drv, int line)
struct uart_state *state; struct uart_state *state;
if (line < 0 || line >= drv->nr) { if (line < 0 || line >= drv->nr) {
printk(KERN_ERR "Attempt to unregister %s%d\n", printk(KERN_ERR "Attempt to unregister ");
drv->dev_name, line); printk(drv->dev_name, line);
printk("\n");
return; return;
} }
......
...@@ -827,11 +827,7 @@ void __init sa1100_rs_console_init(void) ...@@ -827,11 +827,7 @@ void __init sa1100_rs_console_init(void)
static struct uart_driver sa1100_reg = { static struct uart_driver sa1100_reg = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.driver_name = "ttySA", .driver_name = "ttySA",
#ifdef CONFIG_DEVFS_FS
.dev_name = "ttySA%d", .dev_name = "ttySA%d",
#else
.dev_name = "ttySA",
#endif
.major = SERIAL_SA1100_MAJOR, .major = SERIAL_SA1100_MAJOR,
.minor = MINOR_START, .minor = MINOR_START,
.nr = NR_PORTS, .nr = NR_PORTS,
......
...@@ -843,7 +843,7 @@ static struct uart_driver sunsab_reg = { ...@@ -843,7 +843,7 @@ static struct uart_driver sunsab_reg = {
#ifdef CONFIG_DEVFS_FS #ifdef CONFIG_DEVFS_FS
.dev_name = "tts/%d", .dev_name = "tts/%d",
#else #else
.dev_name = "ttyS", .dev_name = "ttyS%d",
#endif #endif
.major = TTY_MAJOR, .major = TTY_MAJOR,
}; };
......
...@@ -1262,7 +1262,7 @@ static struct uart_driver sunsu_reg = { ...@@ -1262,7 +1262,7 @@ static struct uart_driver sunsu_reg = {
#ifdef CONFIG_DEVFS_FS #ifdef CONFIG_DEVFS_FS
.dev_name = "tts/%d", .dev_name = "tts/%d",
#else #else
.dev_name = "ttyS", .dev_name = "ttyS%d",
#endif #endif
.major = TTY_MAJOR, .major = TTY_MAJOR,
}; };
......
...@@ -1003,7 +1003,7 @@ static struct uart_driver sunzilog_reg = { ...@@ -1003,7 +1003,7 @@ static struct uart_driver sunzilog_reg = {
#ifdef CONFIG_DEVFS_FS #ifdef CONFIG_DEVFS_FS
.dev_name = "ttyS%d", .dev_name = "ttyS%d",
#else #else
.dev_name = "ttyS", .dev_name = "ttyS%d",
#endif #endif
.major = TTY_MAJOR, .major = TTY_MAJOR,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment