media: pms.c needs linux/slab.h

Message ID 4FE27936.8090401@xenotime.net (mailing list archive)
State Accepted, archived
Headers

Commit Message

Randy Dunlap June 21, 2012, 1:30 a.m. UTC
  From: Randy Dunlap <rdunlap@xenotime.net>

drivers/media/video/pms.c uses kzalloc() and kfree() so it should
include <linux/slab.h> to fix build errors and a warning.

drivers/media/video/pms.c:1047:2: error: implicit declaration of function 'kzalloc'
drivers/media/video/pms.c:1047:6: warning: assignment makes pointer from integer without a cast
drivers/media/video/pms.c:1116:2: error: implicit declaration of function 'kfree'

Found in mmotm but applies to mainline.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
---
 drivers/media/video/pms.c |    1 +
 1 file changed, 1 insertion(+)

--
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
  

Comments

Hans Verkuil June 21, 2012, 6:12 a.m. UTC | #1
On 21/06/12 03:30, Randy Dunlap wrote:
> From: Randy Dunlap<rdunlap@xenotime.net>
>
> drivers/media/video/pms.c uses kzalloc() and kfree() so it should
> include<linux/slab.h>  to fix build errors and a warning.
>
> drivers/media/video/pms.c:1047:2: error: implicit declaration of function 'kzalloc'
> drivers/media/video/pms.c:1047:6: warning: assignment makes pointer from integer without a cast
> drivers/media/video/pms.c:1116:2: error: implicit declaration of function 'kfree'
>
> Found in mmotm but applies to mainline.
>
> Signed-off-by: Randy Dunlap<rdunlap@xenotime.net>
> Cc: Hans Verkuil<hverkuil@xs4all.nl>

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

> ---
>   drivers/media/video/pms.c |    1 +
>   1 file changed, 1 insertion(+)
>
> --- mmotm-0619.orig/drivers/media/video/pms.c
> +++ mmotm-0619/drivers/media/video/pms.c
> @@ -29,6 +29,7 @@
>   #include<linux/ioport.h>
>   #include<linux/init.h>
>   #include<linux/mutex.h>
> +#include<linux/slab.h>
>   #include<linux/uaccess.h>
>   #include<linux/isa.h>
>   #include<asm/io.h>

--
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

--- mmotm-0619.orig/drivers/media/video/pms.c
+++ mmotm-0619/drivers/media/video/pms.c
@@ -29,6 +29,7 @@ 
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/mutex.h>
+#include <linux/slab.h>
 #include <linux/uaccess.h>
 #include <linux/isa.h>
 #include <asm/io.h>