summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/das08_cs.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/das08_cs.c
parent4ea418b8b2fa8a70d0fcc8231b65e67b3a72984b (diff)
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/das08_cs.c')
-rw-r--r--drivers/staging/comedi/drivers/das08_cs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c
index 4ad398aad72c..8bf6ec2dddba 100644
--- a/drivers/staging/comedi/drivers/das08_cs.c
+++ b/drivers/staging/comedi/drivers/das08_cs.c
@@ -79,17 +79,18 @@ static int das08_cs_attach(struct comedi_device *dev,
if (ret < 0)
return ret;
- dev_info(dev->hw_dev, "comedi%d: das08_cs:\n", dev->minor);
+ dev_info(dev->class_dev, "das08_cs: attach\n");
/* deal with a pci board */
if (thisboard->bustype == pcmcia) {
if (link == NULL) {
- dev_err(dev->hw_dev, "no pcmcia cards found\n");
+ dev_err(dev->class_dev, "no pcmcia cards found\n");
return -EIO;
}
iobase = link->resource[0]->start;
} else {
- dev_err(dev->hw_dev, "bug! board does not have PCMCIA bustype\n");
+ dev_err(dev->class_dev,
+ "bug! board does not have PCMCIA bustype\n");
return -EINVAL;
}