Corrected type mismatch in comedi_alloc_subdevice_minor when creating
authorIan Abbott <abbotti@mev.co.uk>
Wed, 22 Oct 2008 09:41:59 +0000 (09:41 +0000)
committerIan Abbott <abbotti@mev.co.uk>
Wed, 22 Oct 2008 09:41:59 +0000 (09:41 +0000)
device using format "comedi%i_subd%i" (pointer difference type is wider
than int on 64-bit arch).

comedi/comedi_fops.c

index 1634fdad42fcc08bcfd8886a6f1220066896cdb5..db95178380be0171e497445bf2ae6680a0369509 100644 (file)
@@ -2201,7 +2201,7 @@ int comedi_alloc_subdevice_minor(comedi_device *dev, comedi_subdevice *s)
        }
        s->minor = i;
        csdev = COMEDI_DEVICE_CREATE(comedi_class, dev->class_dev,
-               MKDEV(COMEDI_MAJOR, i), NULL, NULL, "comedi%i_subd%i", dev->minor, s - dev->subdevices);
+               MKDEV(COMEDI_MAJOR, i), NULL, NULL, "comedi%i_subd%i", dev->minor, (int)(s - dev->subdevices));
        if(!IS_ERR(csdev))
        {
                s->class_dev = csdev;