From 394dcd9b333b8a1edf3f8c32afeef079ca37d112 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 13 Oct 2000 09:29:45 +0000 Subject: [PATCH] moved BUG check to drivers.c compile warning fix --- comedi/comedi_fops.c | 8 +------- comedi/drivers.c | 5 +++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index 6ef39f34..6c5f9f14 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -156,12 +156,6 @@ static int do_devinfo_ioctl(comedi_device *dev,comedi_devinfo *arg) /* fill devinfo structure */ devinfo.version_code=COMEDI_VERSION_CODE; devinfo.n_subdevs=dev->n_subdevices; -#if 1 - if(!dev->board_name){ - printk("BUG: dev->board_name=<%p>\n",dev->board_name); - return -EFAULT; - } -#endif memcpy(devinfo.driver_name,dev->driver->driver_name,COMEDI_NAMELEN); memcpy(devinfo.board_name,dev->board_name,COMEDI_NAMELEN); memcpy(devinfo.options,dev->options,COMEDI_NDEVCONFOPTS*sizeof(int)); @@ -1189,7 +1183,7 @@ static void *comedi_unmap(struct vm_area_struct *area,unsigned long x,size_t y) static unsigned int comedi_poll_v22(struct file *file, poll_table * wait) { comedi_device *dev; - comedi_subdevice *s; + //comedi_subdevice *s; unsigned int mask; dev=comedi_get_device_by_minor(MINOR(RDEV_OF_FILE(file))); diff --git a/comedi/drivers.c b/comedi/drivers.c index aa565207..af5b967e 100644 --- a/comedi/drivers.c +++ b/comedi/drivers.c @@ -123,6 +123,11 @@ attached: /* do a little post-config cleanup */ postconfig(dev); + if(!dev->board_name){ + printk("BUG: dev->board_name=<%p>\n",dev->board_name); + dev->board_name="BUG"; + } + dev->attached=1; dev->driver=driv; -- 2.26.2