moved BUG check to drivers.c r0_7_50
authorDavid Schleef <ds@schleef.org>
Fri, 13 Oct 2000 09:29:45 +0000 (09:29 +0000)
committerDavid Schleef <ds@schleef.org>
Fri, 13 Oct 2000 09:29:45 +0000 (09:29 +0000)
compile warning fix

comedi/comedi_fops.c
comedi/drivers.c

index 6ef39f34dcab25662c046b9947e7290ecebd6f23..6c5f9f14d866bec46d6581383af1151a6ad2fe55 100644 (file)
@@ -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)));
index aa565207aa6be1193c4926a42f340817ca56ba4c..af5b967e32096598b439347ab257349b2a6f059a 100644 (file)
@@ -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;