]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/serial/cpm_uart/cpm_uart_cpm1.c
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-omap-h63xx.git] / drivers / serial / cpm_uart / cpm_uart_cpm1.c
index 0f0aff06c596cf60fc6207c591fd96bda14d370d..1b94c56ec23914a0c7a44acd04ebe61594f39273 100644 (file)
@@ -100,7 +100,7 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
                mem_addr = (u8 *) cpm_dpram_addr(cpm_dpalloc(memsz, 8));
                dma_addr = (u32)cpm_dpram_phys(mem_addr);
        } else
-               mem_addr = dma_alloc_coherent(NULL, memsz, &dma_addr,
+               mem_addr = dma_alloc_coherent(pinfo->port.dev, memsz, &dma_addr,
                                              GFP_KERNEL);
 
        if (mem_addr == NULL) {
@@ -127,8 +127,8 @@ int cpm_uart_allocbuf(struct uart_cpm_port *pinfo, unsigned int is_con)
 
 void cpm_uart_freebuf(struct uart_cpm_port *pinfo)
 {
-       dma_free_coherent(NULL, L1_CACHE_ALIGN(pinfo->rx_nrfifos *
-                                              pinfo->rx_fifosize) +
+       dma_free_coherent(pinfo->port.dev, L1_CACHE_ALIGN(pinfo->rx_nrfifos *
+                                                         pinfo->rx_fifosize) +
                          L1_CACHE_ALIGN(pinfo->tx_nrfifos *
                                         pinfo->tx_fifosize), pinfo->mem_addr,
                          pinfo->dma_addr);