diff options
Diffstat (limited to 'ztdynamic.c')
-rwxr-xr-x | ztdynamic.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ztdynamic.c b/ztdynamic.c index 4d959dd..b652ae7 100755 --- a/ztdynamic.c +++ b/ztdynamic.c @@ -32,6 +32,7 @@ #include <linux/kmod.h> #include <linux/sched.h> #include <linux/interrupt.h> +#include <linux/vmalloc.h> #ifdef CONFIG_DEVFS_FS #include <linux/devfs_fs_kernel.h> #endif @@ -407,7 +408,7 @@ static void dynamic_destroy(struct zt_dynamic *z) /* Free channels */ if (z->chans); - kfree(z->chans); + vfree(z->chans); /* Free z */ kfree(z); @@ -556,7 +557,7 @@ static int create_dynamic(ZT_DYNAMIC_SPAN *zds) memset(z, 0, sizeof(struct zt_dynamic)); /* Allocate other memories */ - z->chans = kmalloc(sizeof(struct zt_chan) * zds->numchans, GFP_KERNEL); + z->chans = vmalloc(sizeof(struct zt_chan) * zds->numchans); if (!z->chans) { dynamic_destroy(z); return -ENOMEM; |