diff options
Diffstat (limited to 'arch/um/drivers/daemon_user.c')
-rw-r--r-- | arch/um/drivers/daemon_user.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c index 021b82c7a759..09d1de90297c 100644 --- a/arch/um/drivers/daemon_user.c +++ b/arch/um/drivers/daemon_user.c | |||
@@ -39,11 +39,11 @@ static struct sockaddr_un *new_addr(void *name, int len) | |||
39 | sun = um_kmalloc(sizeof(struct sockaddr_un)); | 39 | sun = um_kmalloc(sizeof(struct sockaddr_un)); |
40 | if(sun == NULL){ | 40 | if(sun == NULL){ |
41 | printk("new_addr: allocation of sockaddr_un failed\n"); | 41 | printk("new_addr: allocation of sockaddr_un failed\n"); |
42 | return(NULL); | 42 | return NULL; |
43 | } | 43 | } |
44 | sun->sun_family = AF_UNIX; | 44 | sun->sun_family = AF_UNIX; |
45 | memcpy(sun->sun_path, name, len); | 45 | memcpy(sun->sun_path, name, len); |
46 | return(sun); | 46 | return sun; |
47 | } | 47 | } |
48 | 48 | ||
49 | static int connect_to_switch(struct daemon_data *pri) | 49 | static int connect_to_switch(struct daemon_data *pri) |
@@ -112,7 +112,7 @@ static int connect_to_switch(struct daemon_data *pri) | |||
112 | } | 112 | } |
113 | 113 | ||
114 | pri->data_addr = sun; | 114 | pri->data_addr = sun; |
115 | return(fd); | 115 | return fd; |
116 | 116 | ||
117 | out_free: | 117 | out_free: |
118 | kfree(sun); | 118 | kfree(sun); |
@@ -120,7 +120,7 @@ static int connect_to_switch(struct daemon_data *pri) | |||
120 | os_close_file(fd); | 120 | os_close_file(fd); |
121 | out: | 121 | out: |
122 | os_close_file(pri->control); | 122 | os_close_file(pri->control); |
123 | return(err); | 123 | return err; |
124 | } | 124 | } |
125 | 125 | ||
126 | static void daemon_user_init(void *data, void *dev) | 126 | static void daemon_user_init(void *data, void *dev) |
@@ -152,7 +152,7 @@ static void daemon_user_init(void *data, void *dev) | |||
152 | static int daemon_open(void *data) | 152 | static int daemon_open(void *data) |
153 | { | 153 | { |
154 | struct daemon_data *pri = data; | 154 | struct daemon_data *pri = data; |
155 | return(pri->fd); | 155 | return pri->fd; |
156 | } | 156 | } |
157 | 157 | ||
158 | static void daemon_remove(void *data) | 158 | static void daemon_remove(void *data) |
@@ -176,12 +176,12 @@ int daemon_user_write(int fd, void *buf, int len, struct daemon_data *pri) | |||
176 | { | 176 | { |
177 | struct sockaddr_un *data_addr = pri->data_addr; | 177 | struct sockaddr_un *data_addr = pri->data_addr; |
178 | 178 | ||
179 | return(net_sendto(fd, buf, len, data_addr, sizeof(*data_addr))); | 179 | return net_sendto(fd, buf, len, data_addr, sizeof(*data_addr)); |
180 | } | 180 | } |
181 | 181 | ||
182 | static int daemon_set_mtu(int mtu, void *data) | 182 | static int daemon_set_mtu(int mtu, void *data) |
183 | { | 183 | { |
184 | return(mtu); | 184 | return mtu; |
185 | } | 185 | } |
186 | 186 | ||
187 | const struct net_user_info daemon_user_info = { | 187 | const struct net_user_info daemon_user_info = { |
@@ -194,14 +194,3 @@ const struct net_user_info daemon_user_info = { | |||
194 | .delete_address = NULL, | 194 | .delete_address = NULL, |
195 | .max_packet = MAX_PACKET - ETH_HEADER_OTHER | 195 | .max_packet = MAX_PACKET - ETH_HEADER_OTHER |
196 | }; | 196 | }; |
197 | |||
198 | /* | ||
199 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
200 | * Emacs will notice this stuff at the end of the file and automatically | ||
201 | * adjust the settings for this buffer only. This must remain at the end | ||
202 | * of the file. | ||
203 | * --------------------------------------------------------------------------- | ||
204 | * Local variables: | ||
205 | * c-file-style: "linux" | ||
206 | * End: | ||
207 | */ | ||