[PATCH v2] staging: comedi: shrink comedi_compat32.h
Ian Abbott
abbotti at mev.co.uk
Tue Jun 19 09:58:16 UTC 2012
"comedi_compat32.h" #include's <linux/compat.h>, but that is only needed
by "comedi_compat32.c" so move the #include to that file. Also,
"comedi_compat.h" doesn't really need the '#include <linux/fs.h>' just
to declare 'struct file' as it only uses it to construct a pointer to
that type. Replace that #include with an incomplete declaration of
'struct file' and move that #include into "comedi_compat32.c".
Signed-off-by: Ian Abbott <abbotti at mev.co.uk>
---
v2: Add '#include <linux/fs.h>' to "comedi_compat32.c" to avoid relying
on it being #include'd from elsewhere (<linux/compat.h>).
---
drivers/staging/comedi/comedi_compat32.c | 2 ++
drivers/staging/comedi/comedi_compat32.h | 4 +---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/comedi_compat32.c b/drivers/staging/comedi/comedi_compat32.c
index 41a7a62..0a5057f 100644
--- a/drivers/staging/comedi/comedi_compat32.c
+++ b/drivers/staging/comedi/comedi_compat32.c
@@ -26,6 +26,8 @@
#define __NO_VERSION__
#include <linux/uaccess.h>
+#include <linux/compat.h>
+#include <linux/fs.h>
#include "comedi.h"
#include "comedi_compat32.h"
diff --git a/drivers/staging/comedi/comedi_compat32.h b/drivers/staging/comedi/comedi_compat32.h
index 0340a89..5dd6c73 100644
--- a/drivers/staging/comedi/comedi_compat32.h
+++ b/drivers/staging/comedi/comedi_compat32.h
@@ -27,11 +27,9 @@
#ifndef _COMEDI_COMPAT32_H
#define _COMEDI_COMPAT32_H
-#include <linux/compat.h>
-#include <linux/fs.h>
-
#ifdef CONFIG_COMPAT
+struct file;
extern long comedi_compat_ioctl(struct file *file, unsigned int cmd,
unsigned long arg);
--
1.7.8.6
More information about the devel
mailing list