Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363964
b: refs/heads/master
c: 6013a9a
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 8, 2013
1 parent c336fc0 commit 64335f2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 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: 262235b13c22f6b7f84173f350964e71a849067d
refs/heads/master: 6013a9a57bbe0fd147482297b04d3d848aa24b67
20 changes: 10 additions & 10 deletions trunk/drivers/staging/comedi/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it)
int comedi_auto_config(struct device *hardware_device,
struct comedi_driver *driver, unsigned long context)
{
struct comedi_device *comedi_dev;
struct comedi_device *dev;
int ret;

if (!hardware_device) {
Expand All @@ -417,18 +417,18 @@ int comedi_auto_config(struct device *hardware_device,
return -EINVAL;
}

comedi_dev = comedi_alloc_board_minor(hardware_device);
if (IS_ERR(comedi_dev))
return PTR_ERR(comedi_dev);
/* Note: comedi_alloc_board_minor() locked comedi_dev->mutex. */
dev = comedi_alloc_board_minor(hardware_device);
if (IS_ERR(dev))
return PTR_ERR(dev);
/* Note: comedi_alloc_board_minor() locked dev->mutex. */

comedi_dev->driver = driver;
ret = driver->auto_attach(comedi_dev, context);
dev->driver = driver;
ret = driver->auto_attach(dev, context);
if (ret >= 0)
ret = comedi_device_postconfig(comedi_dev);
ret = comedi_device_postconfig(dev);
if (ret < 0)
comedi_device_detach(comedi_dev);
mutex_unlock(&comedi_dev->mutex);
comedi_device_detach(dev);
mutex_unlock(&dev->mutex);

if (ret < 0)
comedi_release_hardware_device(hardware_device);
Expand Down

0 comments on commit 64335f2

Please sign in to comment.