[-next] v4l2-ctrls.c: needs to include slab.h

Message ID 20100809105635.4208c7ac.randy.dunlap@oracle.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Randy Dunlap Aug. 9, 2010, 5:56 p.m. UTC
  From: Randy Dunlap <randy.dunlap@oracle.com>

v4l2-ctrls.c needs to include slab.h to prevent build errors:

drivers/media/video/v4l2-ctrls.c:766: error: implicit declaration of function 'kzalloc'
drivers/media/video/v4l2-ctrls.c:786: error: implicit declaration of function 'kfree'
drivers/media/video/v4l2-ctrls.c:1528: error: implicit declaration of function 'kmalloc'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
---
 drivers/media/video/v4l2-ctrls.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

Tony Vroon Aug. 11, 2010, 6:45 p.m. UTC | #1
On Mon, 2010-08-09 at 10:56 -0700, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> v4l2-ctrls.c needs to include slab.h to prevent build errors:

This appears to have been missed. Running mainline git:
Linux amalthea 2.6.35-06998-g3d30701 #1 SMP Wed Aug 11 15:33:16 BST 2010
x86_64 Intel(R) Core(TM)2 Duo CPU T9400 @ 2.53GHz GenuineIntel GNU/Linux

Enabling Video 4 Linux results in the breakage promised by Randy:
> drivers/media/video/v4l2-ctrls.c:766: error: implicit declaration of function 'kzalloc'
> drivers/media/video/v4l2-ctrls.c:786: error: implicit declaration of function 'kfree'
> drivers/media/video/v4l2-ctrls.c:1528: error: implicit declaration of function 'kmalloc'

Please apply.

Regards,
  

Patch

--- linux-next-20100809.orig/drivers/media/video/v4l2-ctrls.c
+++ linux-next-20100809/drivers/media/video/v4l2-ctrls.c
@@ -19,6 +19,7 @@ 
  */
 
 #include <linux/ctype.h>
+#include <linux/slab.h>
 #include <media/v4l2-ioctl.h>
 #include <media/v4l2-device.h>
 #include <media/v4l2-ctrls.h>