[media] coda: coda-bit: Include "<linux/slab.h>"

Message ID 1411126350-5936-1-git-send-email-festevam@gmail.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Fabio Estevam Sept. 19, 2014, 11:32 a.m. UTC
  From: Fabio Estevam <fabio.estevam@freescale.com>

coda-bit uses kmalloc/kfree functions, so the slab header needs to be included
in order to fix the following build errors:

drivers/media/platform/coda/coda-bit.c: In function 'coda_fill_bitstream':
drivers/media/platform/coda/coda-bit.c:231:4: error: implicit declaration of function 'kmalloc' [-Werror=implicit-function-declaration]
drivers/media/platform/coda/coda-bit.c: In function 'coda_alloc_framebuffers':
drivers/media/platform/coda/coda-bit.c:312:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 drivers/media/platform/coda/coda-bit.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Philipp Zabel Sept. 19, 2014, 1:05 p.m. UTC | #1
Am Freitag, den 19.09.2014, 08:32 -0300 schrieb Fabio Estevam:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> coda-bit uses kmalloc/kfree functions, so the slab header needs to be included
> in order to fix the following build errors:
> 
> drivers/media/platform/coda/coda-bit.c: In function 'coda_fill_bitstream':
> drivers/media/platform/coda/coda-bit.c:231:4: error: implicit declaration of function 'kmalloc' [-Werror=implicit-function-declaration]
> drivers/media/platform/coda/coda-bit.c: In function 'coda_alloc_framebuffers':
> drivers/media/platform/coda/coda-bit.c:312:3: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>  drivers/media/platform/coda/coda-bit.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
> index 07fc91a..9b8ea8b 100644
> --- a/drivers/media/platform/coda/coda-bit.c
> +++ b/drivers/media/platform/coda/coda-bit.c
> @@ -17,6 +17,7 @@
>  #include <linux/kernel.h>
>  #include <linux/platform_device.h>
>  #include <linux/reset.h>
> +#include <linux/slab.h>
>  #include <linux/videodev2.h>
>  
>  #include <media/v4l2-common.h>

Acked-by: Philipp Zabel <p.zabel@pengutronix.de>

thanks
Philipp

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Patch

diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
index 07fc91a..9b8ea8b 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -17,6 +17,7 @@ 
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 #include <linux/reset.h>
+#include <linux/slab.h>
 #include <linux/videodev2.h>
 
 #include <media/v4l2-common.h>