diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-05-06 17:51:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:13:02 -0400 |
commit | 1ffb9164f51094b7105ce9f81600b222ddf5b82c (patch) | |
tree | b2efe2af99a2827692a7541058eaef9e938f1da6 /arch/um/drivers/net_user.c | |
parent | 6e21aec3fcf6c8862b755d45c0af45acdefff976 (diff) |
uml: remove page_size()
userspace code used to have to call the kernelspace function page_size() in
order to determine the value of the kernel's PAGE_SIZE. Since this is now
available directly from kern_constants.h as UM_KERN_PAGE_SIZE, page_size() can
be deleted and calls changed to use the constant.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/drivers/net_user.c')
-rw-r--r-- | arch/um/drivers/net_user.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c index b63a8604637..3503cff867c 100644 --- a/arch/um/drivers/net_user.c +++ b/arch/um/drivers/net_user.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include "net_user.h" | 18 | #include "net_user.h" |
19 | #include "os.h" | 19 | #include "os.h" |
20 | #include "um_malloc.h" | 20 | #include "um_malloc.h" |
21 | #include "kern_constants.h" | ||
21 | 22 | ||
22 | int tap_open_common(void *dev, char *gate_addr) | 23 | int tap_open_common(void *dev, char *gate_addr) |
23 | { | 24 | { |
@@ -215,7 +216,7 @@ static void change(char *dev, char *what, unsigned char *addr, | |||
215 | sprintf(netmask_buf, "%d.%d.%d.%d", netmask[0], netmask[1], | 216 | sprintf(netmask_buf, "%d.%d.%d.%d", netmask[0], netmask[1], |
216 | netmask[2], netmask[3]); | 217 | netmask[2], netmask[3]); |
217 | 218 | ||
218 | output_len = page_size(); | 219 | output_len = UM_KERN_PAGE_SIZE; |
219 | output = um_kmalloc(output_len); | 220 | output = um_kmalloc(output_len); |
220 | if(output == NULL) | 221 | if(output == NULL) |
221 | printk("change : failed to allocate output buffer\n"); | 222 | printk("change : failed to allocate output buffer\n"); |