From 116d6df1b79dd38920849435976751648392957b Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Tue, 13 Feb 2001 16:57:50 +0000 Subject: [PATCH] remove unnecessary comedi_subdevice *subdev from comedi_async_struct --- comedi/comedi_fops.c | 6 +++--- comedi/drivers.c | 1 - include/linux/comedidev.h | 2 -- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index 273bbdd4..23759554 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -183,7 +183,7 @@ static int do_bufconfig_ioctl(comedi_device *dev,void *arg) return -ENODEV; } - if(rasync->subdev->busy) + if(dev->read_subdev->busy) return -EBUSY; if(rasync->mmap_count){ @@ -201,7 +201,7 @@ static int do_bufconfig_ioctl(comedi_device *dev,void *arg) return -ENODEV; } - if(wasync->subdev->busy) + if(dev->write_subdev->busy) return -EBUSY; if(wasync->mmap_count){ @@ -1598,7 +1598,7 @@ printk("m is %d\n",m); async->buf_user_count = async->buf_int_count; async->buf_user_ptr = async->buf_int_ptr; retval=-EINVAL; - do_cancel(dev, async->subdev); + do_cancel(dev, dev->read_subdev); DPRINTK("buffer overrun\n"); break; } diff --git a/comedi/drivers.c b/comedi/drivers.c index 6275ef3e..e0e84f06 100644 --- a/comedi/drivers.c +++ b/comedi/drivers.c @@ -268,7 +268,6 @@ static void postconfig(comedi_device *dev) async = kmalloc(sizeof(comedi_async), GFP_KERNEL); memset(async, 0, sizeof(comedi_async)); s->async = async; - async->subdev = s; async->prealloc_bufsz=1024*128; /* XXX */ async->prealloc_buf=rvmalloc(async->prealloc_bufsz); diff --git a/include/linux/comedidev.h b/include/linux/comedidev.h index 239943e8..31219b79 100644 --- a/include/linux/comedidev.h +++ b/include/linux/comedidev.h @@ -130,8 +130,6 @@ struct comedi_subdevice_struct{ }; struct comedi_async_struct{ - comedi_subdevice *subdev; /* the subdevice this buffer is associated with */ - void *prealloc_buf; /* pre-allocated buffer */ unsigned int prealloc_bufsz; /* buffer size, in bytes */ unsigned int mmap_count; /* current number of mmaps of prealloc_buf */ -- 2.26.2