Remove complaint: bus_dmamap_destroy() called for map with valid
mappings bus_dma(9) states: "In the event that the DMA handle contains a valid mapping, the mapping will be unloaded via the same mechanism used by bus_dmamap_unload()." And some drivers do mean to skip the unload step.
This commit is contained in:
parent
16d1e38bf6
commit
1b3d605b4e
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bus_dma.c,v 1.12 2002/06/02 14:44:42 drochner Exp $ */
|
||||
/* $NetBSD: bus_dma.c,v 1.13 2002/06/28 15:21:00 briggs Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -128,10 +128,14 @@ _bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
|
|||
#ifdef DEBUG_DMA
|
||||
printf("dmamap_destroy: t=%p map=%p\n", t, map);
|
||||
#endif /* DEBUG_DMA */
|
||||
#ifdef DIAGNOSTIC
|
||||
if (map->dm_nsegs > 0)
|
||||
printf("bus_dmamap_destroy() called for map with valid mappings\n");
|
||||
#endif /* DIAGNOSTIC */
|
||||
|
||||
/*
|
||||
* Explicit unload.
|
||||
*/
|
||||
map->dm_mapsize = 0;
|
||||
map->dm_nsegs = 0;
|
||||
map->_dm_proc = NULL;
|
||||
|
||||
free(map, M_DEVBUF);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue