aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2011-09-22 21:33:13 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-26 19:38:43 -0400
commitfd01a7a1bf6722e32efa679f15507148784af1f7 (patch)
tree728c61021accadca1d3fe42c8bb49131839abeae /drivers/tty
parent9cfb5c05fee914cc65d4706801f6bc424082b5f5 (diff)
drivers/tty: don't use the byte channel handle as a parameter in ehv_bytechan.c
The ePAPR hypervisor byte channel console driver only supports one byte channel as a console, and the byte channel handle is stored in a global variable. It doesn't make any sense to pass that handle as a parameter to the console functions, since these functions already have access to the global variable. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/ehv_bytechan.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index f733718bf8e..1595dba0072 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
@@ -282,7 +282,6 @@ static int ehv_bc_console_byte_channel_send(unsigned int handle, const char *s,
282static void ehv_bc_console_write(struct console *co, const char *s, 282static void ehv_bc_console_write(struct console *co, const char *s,
283 unsigned int count) 283 unsigned int count)
284{ 284{
285 unsigned int handle = (uintptr_t)co->data;
286 char s2[EV_BYTE_CHANNEL_MAX_BYTES]; 285 char s2[EV_BYTE_CHANNEL_MAX_BYTES];
287 unsigned int i, j = 0; 286 unsigned int i, j = 0;
288 char c; 287 char c;
@@ -295,14 +294,14 @@ static void ehv_bc_console_write(struct console *co, const char *s,
295 294
296 s2[j++] = c; 295 s2[j++] = c;
297 if (j >= (EV_BYTE_CHANNEL_MAX_BYTES - 1)) { 296 if (j >= (EV_BYTE_CHANNEL_MAX_BYTES - 1)) {
298 if (ehv_bc_console_byte_channel_send(handle, s2, j)) 297 if (ehv_bc_console_byte_channel_send(stdout_bc, s2, j))
299 return; 298 return;
300 j = 0; 299 j = 0;
301 } 300 }
302 } 301 }
303 302
304 if (j) 303 if (j)
305 ehv_bc_console_byte_channel_send(handle, s2, j); 304 ehv_bc_console_byte_channel_send(stdout_bc, s2, j);
306} 305}
307 306
308/* 307/*
@@ -348,8 +347,6 @@ static int __init ehv_bc_console_init(void)
348 CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE); 347 CONFIG_PPC_EARLY_DEBUG_EHV_BC_HANDLE);
349#endif 348#endif
350 349
351 ehv_bc_console.data = (void *)(uintptr_t)stdout_bc;
352
353 /* add_preferred_console() must be called before register_console(), 350 /* add_preferred_console() must be called before register_console(),
354 otherwise it won't work. However, we don't want to enumerate all the 351 otherwise it won't work. However, we don't want to enumerate all the
355 byte channels here, either, since we only care about one. */ 352 byte channels here, either, since we only care about one. */