===== drivers/usb/host/ohci-omap.c 1.1 vs edited ===== --- 2.6.2-mm1/drivers/usb/host/ohci-mem.c Wed Aug 6 04:52:20 2003 +++ edited/drivers/usb/host/ohci-mem.c Wed Feb 4 10:49:18 2004 @@ -13,7 +13,7 @@ * There's basically three types of memory: * - data used only by the HCD ... kmalloc is fine * - async and periodic schedules, shared by HC and HCD ... these - * need to use pci_pool or pci_alloc_consistent + * need to use dma_pool or dma_alloc_consistent * - driver buffers, read/written by HC ... the hcd glue or the * device driver provides us with dma addresses * @@ -45,18 +45,18 @@ static int ohci_mem_init (struct ohci_hcd *ohci) { - ohci->td_cache = pci_pool_create ("ohci_td", ohci->hcd.pdev, + ohci->td_cache = dma_pool_create ("ohci_td", ohci->hcd.dev, sizeof (struct td), 32 /* byte alignment */, 0 /* no page-crossing issues */); if (!ohci->td_cache) return -ENOMEM; - ohci->ed_cache = pci_pool_create ("ohci_ed", ohci->hcd.pdev, + ohci->ed_cache = dma_pool_create ("ohci_ed", ohci->hcd.dev, sizeof (struct ed), 16 /* byte alignment */, 0 /* no page-crossing issues */); if (!ohci->ed_cache) { - pci_pool_destroy (ohci->td_cache); + dma_pool_destroy (ohci->td_cache); return -ENOMEM; } return 0; @@ -65,11 +65,11 @@ static void ohci_mem_cleanup (struct ohci_hcd *ohci) { if (ohci->td_cache) { - pci_pool_destroy (ohci->td_cache); + dma_pool_destroy (ohci->td_cache); ohci->td_cache = 0; } if (ohci->ed_cache) { - pci_pool_destroy (ohci->ed_cache); + dma_pool_destroy (ohci->ed_cache); ohci->ed_cache = 0; } } @@ -96,7 +96,7 @@ dma_addr_t dma; struct td *td; - td = pci_pool_alloc (hc->td_cache, mem_flags, &dma); + td = dma_pool_alloc (hc->td_cache, mem_flags, &dma); if (td) { /* in case hc fetches it, make it look dead */ memset (td, 0, sizeof *td); @@ -118,7 +118,7 @@ *prev = td->td_hash; else if ((td->hwINFO & TD_DONE) != 0) ohci_dbg (hc, "no hash for td %p\n", td); - pci_pool_free (hc->td_cache, td, td->td_dma); + dma_pool_free (hc->td_cache, td, td->td_dma); } /*-------------------------------------------------------------------------*/ @@ -130,7 +130,7 @@ dma_addr_t dma; struct ed *ed; - ed = pci_pool_alloc (hc->ed_cache, mem_flags, &dma); + ed = dma_pool_alloc (hc->ed_cache, mem_flags, &dma); if (ed) { memset (ed, 0, sizeof (*ed)); INIT_LIST_HEAD (&ed->td_list); @@ -142,6 +142,6 @@ static void ed_free (struct ohci_hcd *hc, struct ed *ed) { - pci_pool_free (hc->ed_cache, ed, ed->dma); + dma_pool_free (hc->ed_cache, ed, ed->dma); } -- Deepak Saxena - dsaxena at plexity dot net - http://www.plexity.net/
------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel