diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2001-11-06 18:05:36 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2001-11-06 18:05:36 +0000 |
commit | 7f451053fcdbc467971b2fb9cdaa1e76ada23adb (patch) | |
tree | db7c78174ab744dbbbcaa3cfd21e2fee7b977d24 | |
parent | 4d214fbb5186fb9f0c27a8b2109a9fe06a9d9e7f (diff) |
memset some places.
-rw-r--r-- | linux-core/drm_auth.c | 1 | ||||
-rw-r--r-- | linux-core/drm_scatter.c | 2 | ||||
-rw-r--r-- | linux/drm_auth.h | 1 | ||||
-rw-r--r-- | linux/drm_lists.h | 2 | ||||
-rw-r--r-- | linux/drm_scatter.h | 2 | ||||
-rw-r--r-- | linux/gamma.h | 2 |
6 files changed, 8 insertions, 2 deletions
diff --git a/linux-core/drm_auth.c b/linux-core/drm_auth.c index 2636e617..8fce6dfc 100644 --- a/linux-core/drm_auth.c +++ b/linux-core/drm_auth.c @@ -64,6 +64,7 @@ int DRM(add_magic)(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic) hash = DRM(hash_magic)(magic); entry = DRM(alloc)(sizeof(*entry), DRM_MEM_MAGIC); if (!entry) return -ENOMEM; + memset(entry, 0, sizeof(*entry)); entry->magic = magic; entry->priv = priv; entry->next = NULL; diff --git a/linux-core/drm_scatter.c b/linux-core/drm_scatter.c index a6b8275f..07e8e4e5 100644 --- a/linux-core/drm_scatter.c +++ b/linux-core/drm_scatter.c @@ -97,6 +97,8 @@ int DRM(sg_alloc)( struct inode *inode, struct file *filp, return -ENOMEM; } + memset(entry->pagelist, 0, pages * sizeof(*entry->pagelist)); + entry->busaddr = DRM(alloc)( pages * sizeof(*entry->busaddr), DRM_MEM_PAGES ); if ( !entry->busaddr ) { diff --git a/linux/drm_auth.h b/linux/drm_auth.h index 2636e617..8fce6dfc 100644 --- a/linux/drm_auth.h +++ b/linux/drm_auth.h @@ -64,6 +64,7 @@ int DRM(add_magic)(drm_device_t *dev, drm_file_t *priv, drm_magic_t magic) hash = DRM(hash_magic)(magic); entry = DRM(alloc)(sizeof(*entry), DRM_MEM_MAGIC); if (!entry) return -ENOMEM; + memset(entry, 0, sizeof(*entry)); entry->magic = magic; entry->priv = priv; entry->next = NULL; diff --git a/linux/drm_lists.h b/linux/drm_lists.h index 3ad487fd..5cd8cd47 100644 --- a/linux/drm_lists.h +++ b/linux/drm_lists.h @@ -42,7 +42,7 @@ int DRM(waitlist_create)(drm_waitlist_t *bl, int count) DRM_MEM_BUFLISTS); if(!bl->bufs) return -ENOMEM; - + memset(bl->bufs, 0, sizeof(*bl->bufs)); bl->count = count; bl->rp = bl->bufs; bl->wp = bl->bufs; diff --git a/linux/drm_scatter.h b/linux/drm_scatter.h index a6b8275f..07e8e4e5 100644 --- a/linux/drm_scatter.h +++ b/linux/drm_scatter.h @@ -97,6 +97,8 @@ int DRM(sg_alloc)( struct inode *inode, struct file *filp, return -ENOMEM; } + memset(entry->pagelist, 0, pages * sizeof(*entry->pagelist)); + entry->busaddr = DRM(alloc)( pages * sizeof(*entry->busaddr), DRM_MEM_PAGES ); if ( !entry->busaddr ) { diff --git a/linux/gamma.h b/linux/gamma.h index 83f6cdc1..a38c3c28 100644 --- a/linux/gamma.h +++ b/linux/gamma.h @@ -63,7 +63,7 @@ #define __HAVE_DMA_QUIESCENT 1 #define DRIVER_DMA_QUIESCENT() do { \ /* FIXME ! */ \ - gamma_dma_quiescent_dual(dev); \ + gamma_dma_quiescent_single(dev); \ return 0; \ } while (0) |