summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2012-09-14 17:33:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-17 05:09:02 -0700
commitca33f4ce35648c2301f398052d0081ebc8e5d7cd (patch)
tree2d1666e533033ddf8f19bd1d2af3ee823d90c22e /drivers
parent6a2a2cdd57d11ee3117539b846a45df6efbd35b1 (diff)
downloadlinux-3.10-ca33f4ce35648c2301f398052d0081ebc8e5d7cd.tar.gz
linux-3.10-ca33f4ce35648c2301f398052d0081ebc8e5d7cd.tar.bz2
linux-3.10-ca33f4ce35648c2301f398052d0081ebc8e5d7cd.zip
staging: comedi: ni_6527: convert printk() to dev_...()
Convert the `printk()` calls in this drivers to use the `dev_...()` calls instead. Remove the initial `printk()` call in the comedi `attach()` handler (`ni6527_attach()`) as it's a bit redundant - the board type and contents of a board ID register are printed later in the function. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/drivers/ni_6527.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/ni_6527.c b/drivers/staging/comedi/drivers/ni_6527.c
index cfebd0bebf1..1f52f3652a6 100644
--- a/drivers/staging/comedi/drivers/ni_6527.c
+++ b/drivers/staging/comedi/drivers/ni_6527.c
@@ -369,8 +369,6 @@ static int ni6527_attach(struct comedi_device *dev, struct comedi_devconfig *it)
struct comedi_subdevice *s;
int ret;
- printk(KERN_INFO "comedi%d: ni6527\n", dev->minor);
-
ret = alloc_private(dev, sizeof(struct ni6527_private));
if (ret < 0)
return ret;
@@ -381,13 +379,13 @@ static int ni6527_attach(struct comedi_device *dev, struct comedi_devconfig *it)
ret = mite_setup(devpriv->mite);
if (ret < 0) {
- printk(KERN_ERR "comedi: error setting up mite\n");
+ dev_err(dev->class_dev, "error setting up mite\n");
return ret;
}
dev->board_name = this_board->name;
- printk(KERN_INFO "comedi board: %s, ID=0x%02x\n", dev->board_name,
- readb(devpriv->mite->daq_io_addr + ID_Register));
+ dev_info(dev->class_dev, "board: %s, ID=0x%02x\n", dev->board_name,
+ readb(devpriv->mite->daq_io_addr + ID_Register));
ret = comedi_alloc_subdevices(dev, 3);
if (ret)
@@ -434,7 +432,7 @@ static int ni6527_attach(struct comedi_device *dev, struct comedi_devconfig *it)
ret = request_irq(mite_irq(devpriv->mite), ni6527_interrupt,
IRQF_SHARED, "ni6527", dev);
if (ret < 0)
- printk(KERN_WARNING "comedi i6527 irq not available\n");
+ dev_warn(dev->class_dev, "irq not available\n");
else
dev->irq = mite_irq(devpriv->mite);
@@ -473,7 +471,7 @@ static int ni6527_find_device(struct comedi_device *dev, int bus, int slot)
}
}
}
- printk(KERN_ERR "comedi 6527: no device found\n");
+ dev_err(dev->class_dev, "ni6527: no device found\n");
mite_list_devices();
return -EIO;
}