(no subject)
From: James C. Georgas (jgeorgas_at_rogers.com)
Date: 08/06/05
- Previous message: Steven Rostedt: "Re: [PATCH] netpoll can lock up on low memory."
- Next in thread: James C. Georgas: "Inclusion order patch"
- Reply: James C. Georgas: "Inclusion order patch"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: linux-kernel@vger.kernel.org Date: Fri, 05 Aug 2005 22:36:06 -0400
This patch lets this header stand alone, since I can never remember
which other headers to include, or in which order.
The three #include lines define the types: kobject, list_head and dev_t,
which are used in the cdev structure.
The forward declaration of struct inode is to quiet the following
compiler warning when including only cdev.h in my file:
include/linux/cdev.h:30: warning: its scope is only this definition or
declaration, which is probably not what you want
I'm not sure, but I think it's saying that I'm declaring a new struct,
which will not be the same as the real struct inode if it is #included
later, because of the scope rules.
(oh yeah, this is my first patch to the list; did I get the format
right?)
BEGIN PATCH:
diff -Nru linux-2.6.12.4/include/linux/cdev.h linux/include/linux/cdev.h
--- linux-2.6.12.4/include/linux/cdev.h 2005-08-05 03:04:37.000000000
-0400
+++ linux/include/linux/cdev.h 2005-08-05 21:41:39.000000000 -0400
@@ -2,6 +2,12 @@
#define _LINUX_CDEV_H
#ifdef __KERNEL__
+#include <linux/kobject.h>
+#include <linux/list.h>
+#include <linux/types.h>
+
+struct inode;
+
struct cdev {
struct kobject kobj;
struct module *owner;
-- James C. Georgas <jgeorgas@rogers.com> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Steven Rostedt: "Re: [PATCH] netpoll can lock up on low memory."
- Next in thread: James C. Georgas: "Inclusion order patch"
- Reply: James C. Georgas: "Inclusion order patch"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|