diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-07-10 07:45:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-10 16:24:24 -0400 |
commit | 108ffa8cbfa323d462a2f4b49f38da3205d36e5a (patch) | |
tree | a9474c48ff4da341ce296b9b26da70dd5bba0fd2 /arch/um/drivers/tty.c | |
parent | 1d3468a6643a6a5905e2ac9ae1fa1aefc06d882a (diff) |
[PATCH] uml: formatting fixes
Fix a bunch of formatting problems.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/drivers/tty.c')
-rw-r--r-- | arch/um/drivers/tty.c | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/arch/um/drivers/tty.c b/arch/um/drivers/tty.c index 94c9265a4f2c..9f70edf5d8ef 100644 --- a/arch/um/drivers/tty.c +++ b/arch/um/drivers/tty.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2001 Jeff Dike (jdike@karaya.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -25,17 +25,17 @@ static void *tty_chan_init(char *str, int device, struct chan_opts *opts) | |||
25 | if(*str != ':'){ | 25 | if(*str != ':'){ |
26 | printk("tty_init : channel type 'tty' must specify " | 26 | printk("tty_init : channel type 'tty' must specify " |
27 | "a device\n"); | 27 | "a device\n"); |
28 | return(NULL); | 28 | return NULL; |
29 | } | 29 | } |
30 | str++; | 30 | str++; |
31 | 31 | ||
32 | data = um_kmalloc(sizeof(*data)); | 32 | data = um_kmalloc(sizeof(*data)); |
33 | if(data == NULL) | 33 | if(data == NULL) |
34 | return(NULL); | 34 | return NULL; |
35 | *data = ((struct tty_chan) { .dev = str, | 35 | *data = ((struct tty_chan) { .dev = str, |
36 | .raw = opts->raw }); | 36 | .raw = opts->raw }); |
37 | 37 | ||
38 | return(data); | 38 | return data; |
39 | } | 39 | } |
40 | 40 | ||
41 | static int tty_open(int input, int output, int primary, void *d, | 41 | static int tty_open(int input, int output, int primary, void *d, |
@@ -45,19 +45,21 @@ static int tty_open(int input, int output, int primary, void *d, | |||
45 | int fd, err; | 45 | int fd, err; |
46 | 46 | ||
47 | fd = os_open_file(data->dev, of_set_rw(OPENFLAGS(), input, output), 0); | 47 | fd = os_open_file(data->dev, of_set_rw(OPENFLAGS(), input, output), 0); |
48 | if(fd < 0) return(fd); | 48 | if(fd < 0) |
49 | return fd; | ||
50 | |||
49 | if(data->raw){ | 51 | if(data->raw){ |
50 | CATCH_EINTR(err = tcgetattr(fd, &data->tt)); | 52 | CATCH_EINTR(err = tcgetattr(fd, &data->tt)); |
51 | if(err) | 53 | if(err) |
52 | return(err); | 54 | return err; |
53 | 55 | ||
54 | err = raw(fd); | 56 | err = raw(fd); |
55 | if(err) | 57 | if(err) |
56 | return(err); | 58 | return err; |
57 | } | 59 | } |
58 | 60 | ||
59 | *dev_out = data->dev; | 61 | *dev_out = data->dev; |
60 | return(fd); | 62 | return fd; |
61 | } | 63 | } |
62 | 64 | ||
63 | struct chan_ops tty_ops = { | 65 | struct chan_ops tty_ops = { |
@@ -72,14 +74,3 @@ struct chan_ops tty_ops = { | |||
72 | .free = generic_free, | 74 | .free = generic_free, |
73 | .winch = 0, | 75 | .winch = 0, |
74 | }; | 76 | }; |
75 | |||
76 | /* | ||
77 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
78 | * Emacs will notice this stuff at the end of the file and automatically | ||
79 | * adjust the settings for this buffer only. This must remain at the end | ||
80 | * of the file. | ||
81 | * --------------------------------------------------------------------------- | ||
82 | * Local variables: | ||
83 | * c-file-style: "linux" | ||
84 | * End: | ||
85 | */ | ||