Commit 6013a9a5 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: drivers: rename 'comedi_dev' in comedi_auto_config()

The struct comedi_device pointer in this file, and the rest of the
comedi subsystem, is typically called 'dev'. Rename the local variable
'comedi_dev' in comedi_auto_config() for consistency.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 262235b1
...@@ -397,7 +397,7 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -397,7 +397,7 @@ int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it)
int comedi_auto_config(struct device *hardware_device, int comedi_auto_config(struct device *hardware_device,
struct comedi_driver *driver, unsigned long context) struct comedi_driver *driver, unsigned long context)
{ {
struct comedi_device *comedi_dev; struct comedi_device *dev;
int ret; int ret;
if (!hardware_device) { if (!hardware_device) {
...@@ -417,18 +417,18 @@ int comedi_auto_config(struct device *hardware_device, ...@@ -417,18 +417,18 @@ int comedi_auto_config(struct device *hardware_device,
return -EINVAL; return -EINVAL;
} }
comedi_dev = comedi_alloc_board_minor(hardware_device); dev = comedi_alloc_board_minor(hardware_device);
if (IS_ERR(comedi_dev)) if (IS_ERR(dev))
return PTR_ERR(comedi_dev); return PTR_ERR(dev);
/* Note: comedi_alloc_board_minor() locked comedi_dev->mutex. */ /* Note: comedi_alloc_board_minor() locked dev->mutex. */
comedi_dev->driver = driver; dev->driver = driver;
ret = driver->auto_attach(comedi_dev, context); ret = driver->auto_attach(dev, context);
if (ret >= 0) if (ret >= 0)
ret = comedi_device_postconfig(comedi_dev); ret = comedi_device_postconfig(dev);
if (ret < 0) if (ret < 0)
comedi_device_detach(comedi_dev); comedi_device_detach(dev);
mutex_unlock(&comedi_dev->mutex); mutex_unlock(&dev->mutex);
if (ret < 0) if (ret < 0)
comedi_release_hardware_device(hardware_device); comedi_release_hardware_device(hardware_device);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment