[PATCH] pull in necessary header files for cdev.h

From: Jan Engelhardt
Date: Wed Oct 18 2006 - 15:12:33 EST




linux/cdev.h uses struct kobject and other structs and should
therefore include them. Currently, a module either needs to add the
missing includes itself, or, in case a module includes other headers
already, needs to put <linux/cdev.h> last, which goes against a
alphabetically-sorted include list.

Signed-off-by: Jan Engelhardt <jengelh@xxxxxx>

Index: linux-2.6.19-rc2/include/linux/cdev.h
===================================================================
--- linux-2.6.19-rc2.orig/include/linux/cdev.h
+++ linux-2.6.19-rc2/include/linux/cdev.h
@@ -2,6 +2,10 @@
#define _LINUX_CDEV_H
#ifdef __KERNEL__

+#include <linux/kobject.h>
+#include <linux/kdev_t.h>
+#include <linux/list.h>
+
struct cdev {
struct kobject kobj;
struct module *owner;
#<EOF>

-`J'
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/