linux/completion.h

Kremer, Alex alex.kremer at intel.com
Mon Oct 15 12:47:46 EDT 2001


| From: Larry Doolittle [mailto:ldoolitt at recycle.lbl.gov]
| 
| You did merge the part that protects the BLKGETSIZE64 cases 
| with an #ifdef. All Alex has to do is disable the #define BLKGETSIZE64
from 
| compatmac.h.
| There might be good reason for _some_ people to define BLKGETSIZE64 in
| compatmac.h, but I don't think that's a robust default.

That is correct. It is already there. Maybe a CONFIG options are in place
here.

I'm attaching a patch that did the trick for me.



diff -urN mtd/drivers/mtd/Config.in mtd-fix/drivers/mtd/Config.in
--- mtd/drivers/mtd/Config.in   Wed Oct  3 13:38:38 2001
+++ mtd-fix/drivers/mtd/Config.in       Mon Oct 15 18:31:34 2001
@@ -11,6 +11,12 @@
    if [ "$CONFIG_MTD_DEBUG" = "y" ]; then
       int '  Debugging verbosity (0 = quiet, 3 = noisy)'
CONFIG_MTD_DEBUG_VERBOSE 0
    fi
+   bool 'Compatibility with kernels older than 2.4.8' CONFIG_MTD_COMPATMAC
+   
+   if [ "$CONFIG_MTD_COMPATMAC" = "y" ]; then
+      bool '     Enable 64 bit block operations'
CONFIG_MTD_COMPATMAC_BLKGETSIZE64
+   fi
+   
    dep_tristate '  MTD partitioning support' CONFIG_MTD_PARTITIONS
$CONFIG_MTD
    dep_tristate '  RedBoot partition table parsing'
CONFIG_MTD_REDBOOT_PARTS $CONFIG_M
TD_PARTITIONS
 if [ "$CONFIG_ARM" = "y" ]; then
diff -urN mtd/fs/jffs2/background.c mtd-fix/fs/jffs2/background.c
--- mtd/fs/jffs2/background.c   Mon Oct  8 11:22:38 2001
+++ mtd-fix/fs/jffs2/background.c       Mon Oct 15 18:31:20 2001
@@ -43,7 +43,11 @@
 #include <linux/jffs2.h>
 #include <linux/mtd/mtd.h>
 #include <linux/interrupt.h>
+#ifdef CONFIG_MTD_COMPATMAC
+#include <linux/mtd/compatmac.h>
+#else
 #include <linux/completion.h>
+#endif
 #include "nodelist.h"
 
 
diff -urN mtd/include/linux/jffs2_fs_sb.h
mtd-fix/include/linux/jffs2_fs_sb.h
--- mtd/include/linux/jffs2_fs_sb.h     Tue Sep 18 23:15:18 2001
+++ mtd-fix/include/linux/jffs2_fs_sb.h Mon Oct 15 18:31:20 2001
@@ -5,7 +5,11 @@
 
 #include <linux/types.h>
 #include <linux/spinlock.h>
+#ifdef CONFIG_MTD_COMPATMAC
+#include <linux/mtd/compatmac.h>
+#else
 #include <linux/completion.h>
+#endif
 #include <asm/semaphore.h>
 #include <linux/list.h>
 
diff -urN mtd/include/linux/mtd/compatmac.h
mtd-fix/include/linux/mtd/compatmac.h
--- mtd/include/linux/mtd/compatmac.h   Tue Oct  2 11:13:53 2001
+++ mtd-fix/include/linux/mtd/compatmac.h       Mon Oct 15 18:31:20 2001
@@ -463,7 +463,7 @@
                }
 }
 #endif
-#ifndef BLKGETSIZE64 /* LINUX_VERSION_CODE < KERNEL_VERSION(2,4,10-pre13)
*/
+#ifdef CONFIG_MTD_COMPATMAC_BLKGETSIZE64
 #define BLKGETSIZE64 _IOR(0x12,114,sizeof(u64)) /* return device size in
bytes (u64 *a
rg) */
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtd-compat.patch
Type: application/octet-stream
Size: 2106 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20011015/98cf2702/attachment.obj 


More information about the linux-mtd mailing list