Renamed CLASS_DEVICE_CREATE to COMEDI_CLASS_DEVICE_CREATE to avoid
authorIan Abbott <abbotti@mev.co.uk>
Tue, 22 Aug 2006 16:26:34 +0000 (16:26 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Tue, 22 Aug 2006 16:26:34 +0000 (16:26 +0000)
name clash with RTAI.

comedi/comedi_fops.c
include/linux/device.h

index 1677cbc3676fb7a23c7615aa0d2a70a498ba4438..07831732f6be85946c107770692c26aa35e3bf13 100644 (file)
@@ -1748,7 +1748,8 @@ static int __init comedi_init(void)
                sprintf(name, "comedi%d", i);
                devfs_register(NULL, name, DEVFS_FL_DEFAULT,
                        COMEDI_MAJOR, i, 0666 | S_IFCHR, &comedi_fops, NULL);
-               CLASS_DEVICE_CREATE(comedi_class, 0, MKDEV(COMEDI_MAJOR, i), NULL, "comedi%i", i);
+               COMEDI_CLASS_DEVICE_CREATE(comedi_class, 0,
+                               MKDEV(COMEDI_MAJOR, i), NULL, "comedi%i", i);
        }
 
        comedi_rt_init();
index c908b60390ef006e6d32b77b14f1642b6833c708..85a296094c5ac38c1ecf20b40cccfebca5c092a5 100644 (file)
@@ -27,7 +27,7 @@ static inline struct class *class_create(struct module *owner, char *name)
 static inline void class_destroy(struct class *cs)
 {};
 
-static inline struct class_device *CLASS_DEVICE_CREATE(struct class *cls,
+static inline struct class_device *COMEDI_CLASS_DEVICE_CREATE(struct class *cls,
        struct class_device *parent, dev_t devt, struct device *device,
        char *fmt, ...)
 {
@@ -47,7 +47,7 @@ static inline void class_device_destroy(struct class *cs, dev_t dev)
        (struct class *)class_simple_create(owner, name)
 #define class_destroy(cs) \
        class_simple_destroy((struct class_simple *)(cs))
-#define CLASS_DEVICE_CREATE(cs, parent, dev, device, fmt...) \
+#define COMEDI_CLASS_DEVICE_CREATE(cs, parent, dev, device, fmt...) \
        class_simple_device_add((struct class_simple *)(cs), \
                dev, device, fmt)
 #define class_device_destroy(cs, dev) \
@@ -57,12 +57,12 @@ static inline void class_device_destroy(struct class *cs, dev_t dev)
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
 
-#define CLASS_DEVICE_CREATE(cs, parent, dev, device, fmt...) \
+#define COMEDI_CLASS_DEVICE_CREATE(cs, parent, dev, device, fmt...) \
        class_device_create(cs, dev, device, fmt)
 
 #else
 
-#define CLASS_DEVICE_CREATE(cs, parent, dev, device, fmt...) \
+#define COMEDI_CLASS_DEVICE_CREATE(cs, parent, dev, device, fmt...) \
        class_device_create(cs, parent, dev, device, fmt)
 
 #endif // LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)