staging: comedi: remove COMEDI_DEVICE_CREATE macro, expand all callers
authorPavel Roskin <proski@gnu.org>
Wed, 6 Jul 2011 14:15:44 +0000 (10:15 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Jul 2011 15:22:49 +0000 (08:22 -0700)
This is no longer needed as the code is now in the main kernel tree.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/comedi_fops.c
drivers/staging/comedi/comedidev.h

index 419976b40bf47d0f46ed997d34650a72f7d5b0a4..e90e3cceb5f8b6ded3ea065a7693ac237c3a2834 100644 (file)
@@ -2175,9 +2175,8 @@ int comedi_alloc_board_minor(struct device *hardware_device)
                return -EBUSY;
        }
        info->device->minor = i;
-       csdev = COMEDI_DEVICE_CREATE(comedi_class, NULL,
-                                    MKDEV(COMEDI_MAJOR, i), NULL,
-                                    hardware_device, "comedi%i", i);
+       csdev = device_create(comedi_class, hardware_device,
+                             MKDEV(COMEDI_MAJOR, i), NULL, "comedi%i", i);
        if (!IS_ERR(csdev))
                info->device->class_dev = csdev;
        dev_set_drvdata(csdev, info);
@@ -2276,10 +2275,9 @@ int comedi_alloc_subdevice_minor(struct comedi_device *dev,
                return -EBUSY;
        }
        s->minor = i;
-       csdev = COMEDI_DEVICE_CREATE(comedi_class, dev->class_dev,
-                                    MKDEV(COMEDI_MAJOR, i), NULL, NULL,
-                                    "comedi%i_subd%i", dev->minor,
-                                    (int)(s - dev->subdevices));
+       csdev = device_create(comedi_class, dev->class_dev,
+                             MKDEV(COMEDI_MAJOR, i), NULL, "comedi%i_subd%i",
+                             dev->minor, (int)(s - dev->subdevices));
        if (!IS_ERR(csdev))
                s->class_dev = csdev;
        dev_set_drvdata(csdev, info);
index 68aa9176d2490c821d4e94ccec459df53390f964..7a0d4bcbc355f944673fa8ac8c9f4738e075126f 100644 (file)
@@ -61,9 +61,6 @@
 #define COMEDI_NUM_BOARD_MINORS 0x30
 #define COMEDI_FIRST_SUBDEVICE_MINOR COMEDI_NUM_BOARD_MINORS
 
-#define COMEDI_DEVICE_CREATE(cs, parent, devt, drvdata, device, fmt...) \
-       device_create(cs, ((parent) ? (parent) : (device)), devt, drvdata, fmt)
-
 struct comedi_subdevice {
        struct comedi_device *device;
        int type;