diff options
author | Alan Cox <alan@linux.intel.com> | 2017-04-12 19:21:44 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-14 10:07:27 +0200 |
commit | 94853b658afceb36a639edd5add6d17b62dc812b (patch) | |
tree | 3868d0c6a868cfb42978d404e592ad0eebdd5590 /drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_host_data.c | |
parent | da22013f7df4e1f49b03d763aae7b12b1cd805d7 (diff) | |
download | op-kernel-dev-94853b658afceb36a639edd5add6d17b62dc812b.zip op-kernel-dev-94853b658afceb36a639edd5add6d17b62dc812b.tar.gz |
atomisp: remove sh_css_malloc indirections where we can
Where we know the buffer size is reasonably constrained we can just use kmalloc,
and where it will be large vmalloc. This still leaves a pile in the middle.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_host_data.c')
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_host_data.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_host_data.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_host_data.c index 1919497..348183a 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_host_data.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_host_data.c @@ -12,7 +12,7 @@ * more details. */ -#include <stddef.h> +#include <linux/slab.h> #include <ia_css_host_data.h> #include <sh_css_internal.h> @@ -20,13 +20,13 @@ struct ia_css_host_data *ia_css_host_data_allocate(size_t size) { struct ia_css_host_data *me; - me = sh_css_malloc(sizeof(struct ia_css_host_data)); + me = kmalloc(sizeof(struct ia_css_host_data), GFP_KERNEL); if (!me) return NULL; me->size = (uint32_t)size; me->address = sh_css_malloc(size); if (!me->address) { - sh_css_free(me); + kfree(me); return NULL; } return me; @@ -37,6 +37,6 @@ void ia_css_host_data_free(struct ia_css_host_data *me) if (me) { sh_css_free(me->address); me->address = NULL; - sh_css_free(me); + kfree(me); } } |