From: Ian Abbott Date: Wed, 22 Oct 2008 09:41:59 +0000 (+0000) Subject: Corrected type mismatch in comedi_alloc_subdevice_minor when creating X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=caa851a91386ba796f8bbf15c48c941e12430fd8;p=comedi.git Corrected type mismatch in comedi_alloc_subdevice_minor when creating device using format "comedi%i_subd%i" (pointer difference type is wider than int on 64-bit arch). --- diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index 1634fdad..db951783 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -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;