diff options
author | Choi jonghwan <jhbird.choi@samsung.com> | 2010-08-25 13:13:40 +0900 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2011-11-17 17:42:24 -0800 |
commit | 33992e656ab13ac0aaac04f7b3c6f2ca526dd594 (patch) | |
tree | 083673f51872d93f19d7a7655d51ee15ed8f4dfd /drivers/tty | |
parent | 62ea087e0fff8dedc2d96da5daf139bd98078aa9 (diff) | |
download | kernel_samsung_crespo-33992e656ab13ac0aaac04f7b3c6f2ca526dd594.zip kernel_samsung_crespo-33992e656ab13ac0aaac04f7b3c6f2ca526dd594.tar.gz kernel_samsung_crespo-33992e656ab13ac0aaac04f7b3c6f2ca526dd594.tar.bz2 |
S5PC110: SERIAL: Fix compile warnning and code clean-up.
This patch includes fixed compile warnning and code clean-up(Coding style, Remove unused code).
When SERIAL_SAMSUNG_CONSOLE is enabled, s5pv210.c file will be compiled.
Change-Id: I7066c618acfea4920681f2123b50ebb924d1d20c
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/samsung.c | 41 | ||||
-rw-r--r-- | drivers/tty/serial/samsung.h | 5 |
2 files changed, 26 insertions, 20 deletions
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 94e4890..ed05a54 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -80,7 +80,7 @@ static inline const char *s3c24xx_serial_portname(struct uart_port *port) static int s3c24xx_serial_txempty_nofifo(struct uart_port *port) { - return (rd_regl(port, S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE); + return rd_regl(port, S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE; } static void s3c24xx_serial_rx_enable(struct uart_port *port) @@ -162,12 +162,14 @@ static void s3c24xx_serial_enable_ms(struct uart_port *port) { } -static inline struct s3c24xx_uart_info *s3c24xx_port_to_info(struct uart_port *port) +static inline struct +s3c24xx_uart_info *s3c24xx_port_to_info(struct uart_port *port) { return to_ourport(port)->info; } -static inline struct s3c2410_uartcfg *s3c24xx_port_to_cfg(struct uart_port *port) +static inline struct +s3c2410_uartcfg *s3c24xx_port_to_cfg(struct uart_port *port) { if (port->dev == NULL) return NULL; @@ -242,7 +244,7 @@ s3c24xx_serial_rx_chars(int irq, void *dev_id) dbg("break!\n"); port->icount.brk++; if (uart_handle_break(port)) - goto ignore_char; + goto ignore_char; } if (uerstat & S3C2410_UERSTAT_FRAME) @@ -777,7 +779,8 @@ static void s3c24xx_serial_set_termios(struct uart_port *port, */ port->read_status_mask = S3C2410_UERSTAT_OVERRUN; if (termios->c_iflag & INPCK) - port->read_status_mask |= S3C2410_UERSTAT_FRAME | S3C2410_UERSTAT_PARITY; + port->read_status_mask |= S3C2410_UERSTAT_FRAME + | S3C2410_UERSTAT_PARITY; /* * Which character status flags should we ignore? @@ -854,7 +857,7 @@ s3c24xx_serial_verify_port(struct uart_port *port, struct serial_struct *ser) static struct console s3c24xx_serial_console; -#define S3C24XX_SERIAL_CONSOLE &s3c24xx_serial_console +#define S3C24XX_SERIAL_CONSOLE (&s3c24xx_serial_console) #else #define S3C24XX_SERIAL_CONSOLE NULL #endif @@ -890,7 +893,8 @@ static struct uart_driver s3c24xx_uart_drv = { .minor = S3C24XX_SERIAL_MINOR, }; -static struct s3c24xx_uart_port s3c24xx_serial_ports[CONFIG_SERIAL_SAMSUNG_UARTS] = { +static struct s3c24xx_uart_port + s3c24xx_serial_ports[CONFIG_SERIAL_SAMSUNG_UARTS] = { [0] = { .port = { .lock = __SPIN_LOCK_UNLOCKED(s3c24xx_serial_ports[0].port.lock), @@ -1018,7 +1022,8 @@ static int s3c24xx_serial_cpufreq_transition(struct notifier_block *nb, return 0; } -static inline int s3c24xx_serial_cpufreq_register(struct s3c24xx_uart_port *port) +static inline int +s3c24xx_serial_cpufreq_register(struct s3c24xx_uart_port *port) { port->freq_transition.notifier_call = s3c24xx_serial_cpufreq_transition; @@ -1026,19 +1031,22 @@ static inline int s3c24xx_serial_cpufreq_register(struct s3c24xx_uart_port *port CPUFREQ_TRANSITION_NOTIFIER); } -static inline void s3c24xx_serial_cpufreq_deregister(struct s3c24xx_uart_port *port) +static inline void +s3c24xx_serial_cpufreq_deregister(struct s3c24xx_uart_port *port) { cpufreq_unregister_notifier(&port->freq_transition, CPUFREQ_TRANSITION_NOTIFIER); } #else -static inline int s3c24xx_serial_cpufreq_register(struct s3c24xx_uart_port *port) +static inline int +s3c24xx_serial_cpufreq_register(struct s3c24xx_uart_port *port) { return 0; } -static inline void s3c24xx_serial_cpufreq_deregister(struct s3c24xx_uart_port *port) +static inline void +s3c24xx_serial_cpufreq_deregister(struct s3c24xx_uart_port *port) { } #endif @@ -1109,7 +1117,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, ourport->rx_irq = ret; ourport->tx_irq = ret + 1; } - + ret = platform_get_irq(platdev, 1); if (ret > 0) ourport->tx_irq = ret; @@ -1178,7 +1186,6 @@ int s3c24xx_serial_probe(struct platform_device *dev, probe_err: return ret; } - EXPORT_SYMBOL_GPL(s3c24xx_serial_probe); int __devexit s3c24xx_serial_remove(struct platform_device *dev) @@ -1193,14 +1200,14 @@ int __devexit s3c24xx_serial_remove(struct platform_device *dev) return 0; } - EXPORT_SYMBOL_GPL(s3c24xx_serial_remove); /* UART power management code */ #ifdef CONFIG_PM -static int s3c24xx_serial_suspend(struct platform_device *dev, pm_message_t state) +static int +s3c24xx_serial_suspend(struct platform_device *dev, pm_message_t state) { struct uart_port *port = s3c24xx_dev_to_port(&dev->dev); @@ -1239,7 +1246,6 @@ int s3c24xx_serial_init(struct platform_driver *drv, return platform_driver_register(drv); } - EXPORT_SYMBOL_GPL(s3c24xx_serial_init); /* module initialisation code */ @@ -1391,9 +1397,8 @@ static int s3c24xx_serial_init_ports(struct s3c24xx_uart_info **info) platdev_ptr = s3c24xx_uart_devs; - for (i = 0; i < CONFIG_SERIAL_SAMSUNG_UARTS; i++, ptr++, platdev_ptr++) { + for (i = 0; i < CONFIG_SERIAL_SAMSUNG_UARTS; i++, ptr++, platdev_ptr++) s3c24xx_serial_init_port(ptr, info[i], *platdev_ptr); - } return 0; } diff --git a/drivers/tty/serial/samsung.h b/drivers/tty/serial/samsung.h index 74985de..5226abe 100644 --- a/drivers/tty/serial/samsung.h +++ b/drivers/tty/serial/samsung.h @@ -56,7 +56,8 @@ struct s3c24xx_uart_port { /* conversion functions */ #define s3c24xx_dev_to_port(__dev) (struct uart_port *)dev_get_drvdata(__dev) -#define s3c24xx_dev_to_cfg(__dev) (struct s3c2410_uartcfg *)((__dev)->platform_data) +#define s3c24xx_dev_to_cfg(__dev) \ + (struct s3c2410_uartcfg *)((__dev)->platform_data) /* register access controls */ @@ -97,7 +98,7 @@ static int __init s3c_serial_console_init(void) \ console_initcall(s3c_serial_console_init) #else -#define s3c24xx_console_init(drv, inf) extern void no_console(void) +#define s3c24xx_console_init(drv, inf) void no_console(void) {} #endif #ifdef CONFIG_SERIAL_SAMSUNG_DEBUG |