mtd/include/linux/mtd compatmac.h,1.78,1.79

lavinen at infradead.org lavinen at infradead.org
Thu Jul 7 08:12:27 EDT 2005


Update of /home/cvs/mtd/include/linux/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv5812/include/linux/mtd

Modified Files:
	compatmac.h 
Log Message:
In case we don't have class functions yet, remap them into class_simple.


Index: compatmac.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/compatmac.h,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- compatmac.h	5 Jul 2005 14:14:18 -0000	1.78
+++ compatmac.h	7 Jul 2005 12:12:23 -0000	1.79
@@ -215,6 +215,14 @@
 #define try_to_freeze() try_to_freeze(0)
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+typedef struct class_simple class;
+#define class_device_create(cs, dev, device, fmt, ...) class_simple_device_add((struct class_simple *)cs, dev, device, fmt, __VA_ARGS__)
+#define class_device_destroy(cs, dev) class_simple_device_remove(dev)
+#define class_create(owner, name) (struct class *)class_simple_create(owner, name)
+#define class_destroy(cs) class_simple_destroy((struct class_simple *)cs)
+#endif
+
 #ifndef list_for_each_entry_safe
 /**
  * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry





More information about the linux-mtd-cvs mailing list