aboutsummaryrefslogtreecommitdiffstats
path: root/console
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-04-23 04:41:33 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-04-23 05:30:44 (GMT)
commit15ed7589922db9a515ce2c8b1d306f48de6f0c2b (patch)
tree9582a9050f6fb2c7695075b645fe2ab07be3b7e9 /console
parentf5e784320cd69db46f8549462ac7bec869018b06 (diff)
Use getpagesize() instead of asm/page.h
This patch were imported from Fedora 12 set of patches for xawtv. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'console')
-rw-r--r--console/fbtools.c4
-rw-r--r--console/matrox.c3
2 files changed, 2 insertions, 5 deletions
diff --git a/console/fbtools.c b/console/fbtools.c
index 6ad7ceb..b3c6944 100644
--- a/console/fbtools.c
+++ b/console/fbtools.c
@@ -21,8 +21,6 @@
#include <linux/vt.h>
#include <linux/fb.h>
-#include <asm/page.h>
-
#include "fbtools.h"
/* -------------------------------------------------------------------- */
@@ -424,7 +422,7 @@ fb_init(char *device, char *mode, int vt)
goto err;
}
#endif
- fb_mem_offset = (unsigned long)(fb_fix.smem_start) & (~PAGE_MASK);
+ fb_mem_offset = (unsigned long)(fb_fix.smem_start) & (getpagesize()-1);
fb_mem = mmap(NULL,fb_fix.smem_len+fb_mem_offset,
PROT_READ|PROT_WRITE,MAP_SHARED,fb,0);
if (-1L == (long)fb_mem) {
diff --git a/console/matrox.c b/console/matrox.c
index e9011a7..73387a6 100644
--- a/console/matrox.c
+++ b/console/matrox.c
@@ -9,7 +9,6 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
-#include <asm/page.h> /* PAGE_SIZE */
#include <linux/fb.h>
#include "byteswap.h"
@@ -226,7 +225,7 @@ gfx_init(int fd)
return -1;
}
off = (unsigned long)fb_fix.mmio_start -
- ((unsigned long)fb_fix.mmio_start & ~(PAGE_SIZE-1));
+ ((unsigned long)fb_fix.mmio_start & ~(getpagesize()-1));
bmmio += off;
mmio = (uint32_t*)bmmio;
return 0;

Privacy Policy