[PATCH] ppc32: 8xx: using dma_alloc_coherent() instead consistent_alloc()

8xx: using dma_alloc_coherent() instead consistent_alloc()

Signed-off-by: Aristeu Sergio Rozanski Filho <aris@conectiva.com.br>
Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Aristeu Sergio Rozanski Filho and committed by Linus Torvalds fc007ddd 8b0ed2fb

+7 -3
+7 -3
arch/ppc/8xx_io/fec.c
··· 1575 1575 struct fec_enet_private *fep; 1576 1576 int i, j, k, err; 1577 1577 unsigned char *eap, *iap, *ba; 1578 - unsigned long mem_addr; 1578 + dma_addr_t mem_addr; 1579 1579 volatile cbd_t *bdp; 1580 1580 cbd_t *cbd_base; 1581 1581 volatile immap_t *immap; ··· 1640 1640 printk("FEC initialization failed.\n"); 1641 1641 return 1; 1642 1642 } 1643 - cbd_base = (cbd_t *)consistent_alloc(GFP_KERNEL, PAGE_SIZE, &mem_addr); 1643 + cbd_base = (cbd_t *)dma_alloc_coherent(dev->class_dev.dev, PAGE_SIZE, 1644 + &mem_addr, GFP_KERNEL); 1644 1645 1645 1646 /* Set receive and transmit descriptor base. 1646 1647 */ ··· 1658 1657 1659 1658 /* Allocate a page. 1660 1659 */ 1661 - ba = (unsigned char *)consistent_alloc(GFP_KERNEL, PAGE_SIZE, &mem_addr); 1660 + ba = (unsigned char *)dma_alloc_coherent(dev->class_dev.dev, 1661 + PAGE_SIZE, 1662 + &mem_addr, 1663 + GFP_KERNEL); 1662 1664 /* BUG: no check for failure */ 1663 1665 1664 1666 /* Initialize the BD for every fragment in the page.