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)
static struct uart_driver serial21285_reg = {
.owner = THIS_MODULE,
.driver_name = "ttyFB",
#ifdef CONFIG_DEVFS_FS
.dev_name = "ttyFB%d",
#else
.dev_name = "ttyFB",
#endif
.major = SERIAL_21285_MAJOR,
.minor = SERIAL_21285_MINOR,
.nr = 1,
......
......@@ -1866,7 +1866,7 @@ static struct uart_driver serial8250_reg = {
#ifdef CONFIG_DEVFS_FS
.dev_name = "tts/%d",
#else
.dev_name = "ttyS",
.dev_name = "ttyS%d",
#endif
.major = TTY_MAJOR,
.minor = 64,
......
......@@ -706,11 +706,7 @@ void __init ambauart_console_init(void)
static struct uart_driver amba_reg = {
.owner = THIS_MODULE,
.driver_name = "ttyAM",
#ifdef CONFIG_DEVFS_FS
.dev_name = "ttyAM%d",
#else
.dev_name = "ttyAM",
#endif
.major = SERIAL_AMBA_MAJOR,
.minor = SERIAL_AMBA_MINOR,
.nr = UART_NR,
......
......@@ -50,14 +50,12 @@
#define UART_NR 2
#ifndef CONFIG_SERIAL_CLPS711X_OLD_NAME
#define SERIAL_CLPS711X_NAME "ttyCL"
#define SERIAL_CLPS711X_MAJOR 204
#define SERIAL_CLPS711X_MINOR 40
#define SERIAL_CLPS711X_NR UART_NR
#else
#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_MINOR 16
#define SERIAL_CLPS711X_NR UART_NR
......@@ -545,7 +543,7 @@ static int __init clps711xuart_console_setup(struct console *co, char *options)
}
static struct console clps711x_console = {
.name = SERIAL_CLPS711X_NAME,
.name = "ttyCL",
.write = clps711xuart_console_write,
.device = clps711xuart_console_device,
.setup = clps711xuart_console_setup,
......@@ -565,12 +563,7 @@ void __init clps711xuart_console_init(void)
static struct uart_driver clps711x_reg = {
.driver_name = "ttyCL",
#ifdef CONFIG_DEVFS_FS
.dev_name = SERIAL_CLPS711X_NAME,
#else
.dev_name = SERIAL_CLPS711X_NAME,
#endif
.dev_name = "ttyCL%d",
.major = SERIAL_CLPS711X_MAJOR,
.minor = SERIAL_CLPS711X_MINOR,
.nr = UART_NR,
......
......@@ -1981,7 +1981,8 @@ static int uart_pm(struct pm_dev *dev, pm_request_t rqst, void *data)
static inline void
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) {
case UPIO_PORT:
printk("I/O 0x%x", port->iobase);
......@@ -2439,8 +2440,9 @@ void uart_unregister_port(struct uart_driver *drv, int line)
struct uart_state *state;
if (line < 0 || line >= drv->nr) {
printk(KERN_ERR "Attempt to unregister %s%d\n",
drv->dev_name, line);
printk(KERN_ERR "Attempt to unregister ");
printk(drv->dev_name, line);
printk("\n");
return;
}
......
......@@ -827,11 +827,7 @@ void __init sa1100_rs_console_init(void)
static struct uart_driver sa1100_reg = {
.owner = THIS_MODULE,
.driver_name = "ttySA",
#ifdef CONFIG_DEVFS_FS
.dev_name = "ttySA%d",
#else
.dev_name = "ttySA",
#endif
.major = SERIAL_SA1100_MAJOR,
.minor = MINOR_START,
.nr = NR_PORTS,
......
......@@ -843,7 +843,7 @@ static struct uart_driver sunsab_reg = {
#ifdef CONFIG_DEVFS_FS
.dev_name = "tts/%d",
#else
.dev_name = "ttyS",
.dev_name = "ttyS%d",
#endif
.major = TTY_MAJOR,
};
......
......@@ -1262,7 +1262,7 @@ static struct uart_driver sunsu_reg = {
#ifdef CONFIG_DEVFS_FS
.dev_name = "tts/%d",
#else
.dev_name = "ttyS",
.dev_name = "ttyS%d",
#endif
.major = TTY_MAJOR,
};
......
......@@ -1003,7 +1003,7 @@ static struct uart_driver sunzilog_reg = {
#ifdef CONFIG_DEVFS_FS
.dev_name = "ttyS%d",
#else
.dev_name = "ttyS",
.dev_name = "ttyS%d",
#endif
.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