summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2011-11-16 19:47:08 -0500
committerMartin-Éric Racine <martin-eric.racine@iki.fi>2011-11-21 10:33:10 +0200
commitfc9957114875edb94cba89a4f4f0e023f2c98bfb (patch)
tree3167003a6fdf3844d63aaaa8552602867767b2eb
parent100576b3a0a38da7a957969745b2cf087929c478 (diff)
Remove ztv LINUX_2_6 switch and dead code
The makefile defines LINUX_2_6 so the "else" code is dead. The port from kernel 2.4 is complete. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--ztv/Makefile.am5
-rw-r--r--ztv/z4l.c22
2 files changed, 1 insertions, 26 deletions
diff --git a/ztv/Makefile.am b/ztv/Makefile.am
index 32572cc..f4aaf1b 100644
--- a/ztv/Makefile.am
+++ b/ztv/Makefile.am
@@ -1,10 +1,7 @@
if BUILD_ZTV
-AM_CFLAGS = \
- $(XORG_CFLAGS) \
- $(AMD_CFLAGS) \
- -DLINUX_2_6
+AM_CFLAGS = $(XORG_CFLAGS) $(AMD_CFLAGS)
ztv_drv_la_LTLIBRARIES = ztv_drv.la
ztv_drv_la_LDFLAGS = -module -avoid-version
diff --git a/ztv/z4l.c b/ztv/z4l.c
index d44ff73..c6a7c58 100644
--- a/ztv/z4l.c
+++ b/ztv/z4l.c
@@ -190,7 +190,6 @@ IoCtl(int fd, unsigned int fn, void *arg, int flag)
static void
z4l_ovly_unmap(Z4lPortPrivRec * pPriv)
{
-#ifdef LINUX_2_6
int i, nbfrs;
nbfrs = pPriv->nbfrs;
@@ -200,12 +199,6 @@ z4l_ovly_unmap(Z4lPortPrivRec * pPriv)
pPriv->bfrs[i].start = NULL;
}
}
-#else
- if (pPriv->bfrs[0].start != NULL) {
- munmap((void *)pPriv->bfrs[0].start, pPriv->bufsz);
- pPriv->bfrs[0].start = NULL;
- }
-#endif
pPriv->nbfrs = -1;
pPriv->bufsz = -1;
pPriv->last = -1;
@@ -252,27 +245,12 @@ z4l_ovly_map(Z4lPortPrivRec * pPriv, int dir)
pPriv->bufsz = bsz;
}
-#ifdef LINUX_2_6
for (i = 0; i < pPriv->nbfrs; ++i) {
pPriv->bfrs[i].start = mmap(NULL, bfr.length, PROT_READ | PROT_WRITE,
MAP_SHARED, fd, pPriv->bfrs[i].offset);
if (pPriv->bfrs[i].start == MAP_FAILED)
goto xit;
}
-#else
- pPriv->bfrs[0].offset = 0;
- pPriv->bfrs[0].start =
- mmap(NULL, pPriv->bufsz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
-
- if (pPriv->bfrs[0].start == MAP_FAILED) {
- pPriv->bfrs[0].start = NULL;
- goto xit;
- }
-
- offset = (unsigned long)pPriv->bfrs[0].start;
- for (i = 1; i < pPriv->nbfrs; ++i)
- pPriv->bfrs[i].start = (void *)(offset + pPriv->bfrs[i].offset);
-#endif
for (i = 0; i < pPriv->nbfrs; ++i) {
DBLOG(3, "bfr %d ofs %#lx adr %p sz %lu\n", i, pPriv->bfrs[i].offset,