Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324536
b: refs/heads/master
c: 8c3714d
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Aug 15, 2012
1 parent 3820e22 commit d1b0cc5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3131de834e8ff8f6f1581d838a51cf30e8d22b61
refs/heads/master: 8c3714d60c0b681179000e3e1b5aae15d99e6218
19 changes: 16 additions & 3 deletions trunk/drivers/staging/comedi/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it)
}
return -EIO;
}
if (driv->attach == NULL) {
/* driver does not support manual configuration */
dev_warn(dev->class_dev,
"driver '%s' does not support attach using comedi_config\n",
driv->driver_name);
module_put(driv->module);
return -ENOSYS;
}
/* initialize dev->driver here so
* comedi_error() can be called from attach */
dev->driver = driv;
Expand Down Expand Up @@ -885,13 +893,18 @@ static int comedi_auto_config_wrapper(struct comedi_device *dev, void *context)
dev->board_ptr = comedi_recognize(driv, it->board_name);
if (dev->board_ptr == NULL) {
printk(KERN_WARNING
"comedi: auto config failed to find board entry"
" '%s' for driver '%s'\n", it->board_name,
driv->driver_name);
"comedi: auto config failed to find board entry '%s' for driver '%s'\n",
it->board_name, driv->driver_name);
comedi_report_boards(driv);
return -EINVAL;
}
}
if (!driv->attach) {
printk(KERN_WARNING
"comedi: BUG! driver '%s' using old-style auto config but has no attach handler\n",
driv->driver_name);
return -EINVAL;
}
return driv->attach(dev, it);
}

Expand Down

0 comments on commit d1b0cc5

Please sign in to comment.