From 78397539bfb086b97dc0098d32f83df73010242c Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Wed, 30 Jan 2002 03:19:08 +0000 Subject: [PATCH] fixed pointer arithmetic --- comedi/comedi_fops.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index a1c2ef49..7b7a3bdc 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -294,14 +294,12 @@ static int do_devinfo_ioctl(comedi_device *dev,comedi_devinfo *arg) memcpy(devinfo.board_name,dev->board_name,COMEDI_NAMELEN); if(dev->read_subdev){ - devinfo.read_subdevice = (dev->read_subdev - dev->subdevices)/ - sizeof(comedi_subdevice); + devinfo.read_subdevice = dev->read_subdev - dev->subdevices; }else{ devinfo.read_subdevice = -1; } if(dev->write_subdev){ - devinfo.write_subdevice = (dev->write_subdev - dev->subdevices)/ - sizeof(comedi_subdevice); + devinfo.write_subdevice = dev->write_subdev - dev->subdevices; }else{ devinfo.write_subdevice = -1; } -- 2.26.2