From e70fb539a634ab86153353aec8a9c1fede818eb0 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Tue, 22 Jan 2013 23:40:06 +0000 Subject: serial: arm_dcc: Remove CONFIG_ARM_DCC_MULTI option CONFIG_ARM_DCC_MULTI should be also removed in the patch "serial: Remove CONFIG_SERIAL_MULTI from serial drivers" (sha1: a3827250606895ec2dd4b8d867342b7cabf3692f) Because the driver defines serial_* functions which cause conflict with serial.c (multiple definition of serial_*) Removing CONFIG_SERIAL_MULTI function also require to define default_serial_console for cases where another serial driver is not available in the system. Signed-off-by: Michal Simek Acked-by: Marek Vasut --- drivers/serial/arm_dcc.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'drivers/serial/arm_dcc.c') diff --git a/drivers/serial/arm_dcc.c b/drivers/serial/arm_dcc.c index 7b5ecb5..812dcf0 100644 --- a/drivers/serial/arm_dcc.c +++ b/drivers/serial/arm_dcc.c @@ -89,15 +89,6 @@ #define TIMEOUT_COUNT 0x4000000 -#ifndef CONFIG_ARM_DCC_MULTI -#define arm_dcc_init serial_init -void serial_setbrg(void) {} -#define arm_dcc_getc serial_getc -#define arm_dcc_putc serial_putc -#define arm_dcc_puts serial_puts -#define arm_dcc_tstc serial_tstc -#endif - int arm_dcc_init(void) { return 0; @@ -147,7 +138,6 @@ int arm_dcc_tstc(void) return reg; } -#ifdef CONFIG_ARM_DCC_MULTI static struct stdio_dev arm_dcc_dev; int drv_arm_dcc_init(void) @@ -167,4 +157,8 @@ int drv_arm_dcc_init(void) return stdio_register(&arm_dcc_dev); } -#endif + +__weak struct serial_device *default_serial_console(void) +{ + return NULL; +} -- cgit v1.1 From 10ec0f8a74a35f4b601dd1c84931962b809919bb Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Tue, 22 Jan 2013 23:40:07 +0000 Subject: serial: arm_dcc: Fix compilation warning and remove unneeded initialization - arm_dcc_dev is already initialized. - Remove unused rc variable Warning log: arm_dcc.c: In function 'drv_arm_dcc_init': arm_dcc.c:145:6: warning: unused variable 'rc' [-Wunused-variable] Signed-off-by: Michal Simek Acked-by: Marek Vasut --- drivers/serial/arm_dcc.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'drivers/serial/arm_dcc.c') diff --git a/drivers/serial/arm_dcc.c b/drivers/serial/arm_dcc.c index 812dcf0..c217c88 100644 --- a/drivers/serial/arm_dcc.c +++ b/drivers/serial/arm_dcc.c @@ -142,11 +142,6 @@ static struct stdio_dev arm_dcc_dev; int drv_arm_dcc_init(void) { - int rc; - - /* Device initialization */ - memset(&arm_dcc_dev, 0, sizeof(arm_dcc_dev)); - strcpy(arm_dcc_dev.name, "dcc"); arm_dcc_dev.ext = 0; /* No extensions */ arm_dcc_dev.flags = DEV_FLAGS_INPUT | DEV_FLAGS_OUTPUT; -- cgit v1.1