staging: bc_video: remove unused mem alloc and camera interface
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Fri, 27 Apr 2012 14:24:02 +0000 (17:24 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:30:56 +0000 (12:30 +0300)
No functional changes.

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
drivers/staging/mrst/bc_video/bufferclass_video_linux.c

index 75ae35c..0a0f29f 100644 (file)
@@ -278,93 +278,6 @@ BCFreeDiscontigMemory(unsigned long ulSize,
        vfree(LinAddr);
 }
 
-static BCE_ERROR
-BCAllocContigMemory(unsigned long ulSize,
-                   BCE_HANDLE unref__ * phMemHandle,
-                   IMG_CPU_VIRTADDR * pLinAddr, IMG_CPU_PHYADDR * pPhysAddr)
-{
-#if defined(LMA)
-       void *pvLinAddr;
-
-
-       if (g_ulMemCurrent + ulSize >= PVR_BUFFERCLASS_MEMSIZE) {
-               return (BCE_ERROR_OUT_OF_MEMORY);
-       }
-
-       pvLinAddr = ioremap(g_ulMemBase + g_ulMemCurrent, ulSize);
-
-       if (pvLinAddr) {
-               pPhysAddr->uiAddr = g_ulMemBase + g_ulMemCurrent;
-               *pLinAddr = pvLinAddr;
-
-               g_ulMemCurrent += ulSize;
-               return (BCE_OK);
-       }
-       return (BCE_ERROR_OUT_OF_MEMORY);
-#else
-#if defined(BCE_USE_SET_MEMORY)
-       void *pvLinAddr;
-       unsigned long ulAlignedSize = PAGE_ALIGN(ulSize);
-       int iPages = (int)(ulAlignedSize >> PAGE_SHIFT);
-       int iError;
-
-       pvLinAddr = kmalloc(ulAlignedSize, GFP_KERNEL);
-       BUG_ON(((unsigned long) pvLinAddr) & ~PAGE_MASK);
-
-       iError = set_memory_wc((unsigned long) pvLinAddr, iPages);
-       if (iError != 0) {
-               printk(KERN_ERR DRVNAME
-                      ": BCAllocContigMemory:  set_memory_wc failed (%d)\n", iError);
-               return (BCE_ERROR_OUT_OF_MEMORY);
-       }
-
-       pPhysAddr->uiAddr = virt_to_phys(pvLinAddr);
-       *pLinAddr = pvLinAddr;
-
-       return (BCE_OK);
-#else
-       dma_addr_t dma;
-       void *pvLinAddr;
-
-       pvLinAddr = dma_alloc_coherent(NULL, ulSize, &dma, GFP_KERNEL);
-       if (pvLinAddr == NULL) {
-               return (BCE_ERROR_OUT_OF_MEMORY);
-       }
-
-       pPhysAddr->uiAddr = dma;
-       *pLinAddr = pvLinAddr;
-
-       return (BCE_OK);
-#endif
-#endif
-}
-
-static void
-BCFreeContigMemory(unsigned long ulSize,
-                  BCE_HANDLE unref__ hMemHandle,
-                  IMG_CPU_VIRTADDR LinAddr, IMG_CPU_PHYADDR PhysAddr)
-{
-#if defined(LMA)
-       g_ulMemCurrent -= ulSize;
-       iounmap(LinAddr);
-#else
-#if defined(BCE_USE_SET_MEMORY)
-       unsigned long ulAlignedSize = PAGE_ALIGN(ulSize);
-       int iError;
-       int iPages = (int)(ulAlignedSize >> PAGE_SHIFT);
-
-       iError = set_memory_wb((unsigned long) LinAddr, iPages);
-       if (iError != 0) {
-               printk(KERN_ERR DRVNAME
-                      ": BCFreeContigMemory:  set_memory_wb failed (%d)\n", iError);
-       }
-       kfree(LinAddr);
-#else
-       dma_free_coherent(NULL, ulSize, LinAddr, (dma_addr_t) PhysAddr.uiAddr);
-#endif
-#endif
-}
-
 IMG_SYS_PHYADDR
 CpuPAddrToSysPAddrBC(IMG_CPU_PHYADDR cpu_paddr)
 {