Update of /cvsroot/alsa/alsa-driver/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12445
Modified Files: adriver.h Log Message: Added dma_*_coherent() wrappers for 2.4- kernels Index: adriver.h =================================================================== RCS file: /cvsroot/alsa/alsa-driver/include/adriver.h,v retrieving revision 1.73 retrieving revision 1.74 diff -u -r1.73 -r1.74 --- adriver.h 3 Mar 2004 12:08:15 -0000 1.73 +++ adriver.h 4 Mar 2004 14:02:26 -0000 1.74 @@ -450,10 +450,22 @@ struct device *snd_kdevice_pci(struct pci_dev *pci); -void *dma_alloc_coherent(struct device *dev, size_t size, - dma_addr_t *dma_handle, int flag); -void dma_free_coherent(struct device *dev, size_t size, - void *vaddr, dma_addr_t dma_handle); +static inline struct pci_dev *to_pci_dev(struct device *dev) +{ + return dev->d.pci; +} + +static inline void *dma_alloc_coherent(struct device *dev, size_t size, + dma_addr_t *dma_handle, int flag) +{ + return pci_alloc_consistent(to_pci_dev(dev), size, dma_handle); +} + +static inline void dma_free_coherent(struct device *dev, size_t size, + void *vaddr, dma_addr_t dma_handle) +{ + pci_free_consistent(to_pci_dev(dev), size, vaddr, dma_handle); +} #else ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog