summaryrefslogtreecommitdiff
path: root/arch/um/os-Linux/drivers/ethertap_user.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-05-06 14:51:22 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 12:13:02 -0700
commit1ffb9164f51094b7105ce9f81600b222ddf5b82c (patch)
treeb2efe2af99a2827692a7541058eaef9e938f1da6 /arch/um/os-Linux/drivers/ethertap_user.c
parent6e21aec3fcf6c8862b755d45c0af45acdefff976 (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/os-Linux/drivers/ethertap_user.c')
-rw-r--r--arch/um/os-Linux/drivers/ethertap_user.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/um/os-Linux/drivers/ethertap_user.c b/arch/um/os-Linux/drivers/ethertap_user.c
index 4e38ccf35129..96e12ea8172c 100644
--- a/arch/um/os-Linux/drivers/ethertap_user.c
+++ b/arch/um/os-Linux/drivers/ethertap_user.c
@@ -20,6 +20,7 @@
#include "etap.h"
#include "os.h"
#include "um_malloc.h"
+#include "kern_constants.h"
#define MAX_PACKET ETH_MAX_PACKET
@@ -50,10 +51,10 @@ static void etap_change(int op, unsigned char *addr, unsigned char *netmask,
n = os_write_file(fd, &change, sizeof(change));
if(n != sizeof(change))
printk("etap_change - request failed, err = %d\n", -n);
- output = um_kmalloc(page_size());
+ output = um_kmalloc(UM_KERN_PAGE_SIZE);
if(output == NULL)
printk("etap_change : Failed to allocate output buffer\n");
- read_output(fd, output, page_size());
+ read_output(fd, output, UM_KERN_PAGE_SIZE);
if(output != NULL){
printk("%s", output);
kfree(output);
@@ -159,7 +160,7 @@ static int etap_open(void *data)
err = etap_tramp(pri->dev_name, pri->gate_addr, control_fds[0],
control_fds[1], data_fds[0], data_fds[1]);
- output_len = page_size();
+ output_len = UM_KERN_PAGE_SIZE;
output = um_kmalloc(output_len);
read_output(control_fds[0], output, output_len);