aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/ni_pcimio.c
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2012-06-18 14:05:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-18 17:13:06 -0700
commitf41ad6675f2d5705a0fc1e210af8eb4a27dbacb4 (patch)
tree3d4eba82cadb7f74c3d6528452e7396e487c99c5 /drivers/staging/comedi/drivers/ni_pcimio.c
parentStaging: speakup: fix an improperly-declared variable. (diff)
downloadlinux-dev-f41ad6675f2d5705a0fc1e210af8eb4a27dbacb4.tar.xz
linux-dev-f41ad6675f2d5705a0fc1e210af8eb4a27dbacb4.zip
staging: comedi: change device used in dev_...() calls
A previous set of patches by Ravishankar Karkala Mallikarjunayya replaced a load of printk() calls with dev_info(), dev_err(), etc. Unfortunately, these used the 'struct device *hw_dev' member of 'struct comedi_device') as the first parameter of these dev_...() calls, but that pointer is usually NULL, so the kernel log messages come out a bit wrong (they contain the phrase "(NULL device *)"). Use the 'struct device *class_dev' member of 'struct comedi_device' instead for these dev_...() calls. It will be non-NULL and somewhat meaningful to users. It's also consistent with those comedi drivers that already use the class_dev member in their dev_...() calls. Some of the messages included the format "comedi%d" with the minor device number used for the "%d". This is now redundant as it will be the same as the dev_name() part of the kernel log message produced by the dev_...() calls. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/ni_pcimio.c')
-rw-r--r--drivers/staging/comedi/drivers/ni_pcimio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c b/drivers/staging/comedi/drivers/ni_pcimio.c
index 3974c0d98d2a..89f4d43c6d08 100644
--- a/drivers/staging/comedi/drivers/ni_pcimio.c
+++ b/drivers/staging/comedi/drivers/ni_pcimio.c
@@ -1593,7 +1593,7 @@ static int pcimio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
int ret;
- dev_info(dev->hw_dev, "comedi%d: ni_pcimio:\n", dev->minor);
+ dev_info(dev->class_dev, "ni_pcimio: attach\n");
ret = ni_alloc_private(dev);
if (ret < 0)
@@ -1603,7 +1603,7 @@ static int pcimio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (ret < 0)
return ret;
- dev_dbg(dev->hw_dev, "%s\n", boardtype.name);
+ dev_dbg(dev->class_dev, "%s\n", boardtype.name);
dev->board_name = boardtype.name;
if (boardtype.reg_type & ni_reg_m_series_mask) {