diff options
author | Martin Reindl <martin@cvs.openbsd.org> | 2005-06-10 04:11:49 +0000 |
---|---|---|
committer | Martin Reindl <martin@cvs.openbsd.org> | 2005-06-10 04:11:49 +0000 |
commit | d795782393697f57ba4285abccc351e9d93336e3 (patch) | |
tree | c55a40669d9f8e494add5e1edfa13e5675e53699 /sys/dev/usb/usb_mem.h | |
parent | 79cd30c1291e309ddcb4b4db84d8b3f8f9e64f1b (diff) |
remove unused code and un-ifdef
ok dlg@
Diffstat (limited to 'sys/dev/usb/usb_mem.h')
-rw-r--r-- | sys/dev/usb/usb_mem.h | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/sys/dev/usb/usb_mem.h b/sys/dev/usb/usb_mem.h index 28b3d45cb6f..e5c9fc11f2f 100644 --- a/sys/dev/usb/usb_mem.h +++ b/sys/dev/usb/usb_mem.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_mem.h,v 1.10 2003/07/08 13:19:09 nate Exp $ */ +/* $OpenBSD: usb_mem.h,v 1.11 2005/06/10 04:11:48 martin Exp $ */ /* $NetBSD: usb_mem.h,v 1.20 2003/05/03 18:11:42 wiz Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_mem.h,v 1.9 1999/11/17 22:33:47 n_hibma Exp $ */ @@ -39,7 +39,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#if defined(__NetBSD__) || defined(__OpenBSD__) typedef struct usb_dma_block { bus_dma_tag_t tag; bus_dmamap_t map; @@ -58,31 +57,3 @@ typedef struct usb_dma_block { usbd_status usb_allocmem(usbd_bus_handle,size_t,size_t, usb_dma_t *); void usb_freemem(usbd_bus_handle, usb_dma_t *); - -#elif defined(__FreeBSD__) - -/* - * FreeBSD does not have special functions for DMA memory, so let's keep it - * simple for now. - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/queue.h> -#include <sys/proc.h> -#include <sys/buf.h> -#include <sys/malloc.h> -#include <sys/kernel.h> -#include <vm/vm.h> - -#define usb_allocmem(t,s,a,p) (*(p) = malloc(s, M_USB, M_NOWAIT), (*(p) == NULL? USBD_NOMEM: USBD_NORMAL_COMPLETION)) -#define usb_freemem(t,p) (free(*(p), M_USB)) - -#ifdef __alpha__ -#define DMAADDR(dma, o) (alpha_XXX_dmamap((vm_offset_t) *(dma) + (o))) -#else -#define DMAADDR(dma, o) (vtophys(*(dma) + (o))) -#endif -#define KERNADDR(dma, o) ((void *) ((char *)*(dma) + (o))) -#endif /* __FreeBSD__ */ - |