summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/video/pwc/pwc-if.c25
-rw-r--r--v4l/compat.h10
2 files changed, 10 insertions, 25 deletions
diff --git a/linux/drivers/media/video/pwc/pwc-if.c b/linux/drivers/media/video/pwc/pwc-if.c
index 56d4b5f0f..55d252bae 100644
--- a/linux/drivers/media/video/pwc/pwc-if.c
+++ b/linux/drivers/media/video/pwc/pwc-if.c
@@ -209,33 +209,8 @@ static struct video_device pwc_template = {
/* Here we want the physical address of the memory.
* This is used when initializing the contents of the area.
*/
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
-static unsigned long kvirt_to_pa(unsigned long adr)
-{
- unsigned long kva, ret;
-
- kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
- kva |= adr & (PAGE_SIZE-1); /* restore the offset */
- ret = __pa(kva);
- return ret;
-}
-#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
-/**
- * kzalloc - allocate memory. The memory is set to zero.
- * @size: how many bytes of memory are required.
- * @flags: the type of memory to allocate.
- */
-void *kzalloc(size_t size, int flags)
-{
- void *ret = kmalloc(size, flags);
- if (ret)
- memset(ret, 0, size);
- return ret;
-}
-#endif
static void *pwc_rvmalloc(unsigned long size)
{
diff --git a/v4l/compat.h b/v4l/compat.h
index 4c7ee52a0..17ffc7830 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -204,6 +204,16 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr)
return page_to_pfn(vmalloc_to_page(vmalloc_addr));
}
+static unsigned long kvirt_to_pa(unsigned long adr)
+{
+ unsigned long kva, ret;
+
+ kva = (unsigned long) page_address(vmalloc_to_page((void *)adr));
+ kva |= adr & (PAGE_SIZE-1); /* restore the offset */
+ ret = __pa(kva);
+ return ret;
+}
+
#ifndef wait_event_timeout
#define wait_event_timeout(wq, condition, timeout) \
({ \