From caa851a91386ba796f8bbf15c48c941e12430fd8 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Wed, 22 Oct 2008 09:41:59 +0000 Subject: [PATCH] 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). --- comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.26.2