From: YAMANE Toshiaki <yamanetoshi@gmail.com>
To: Greg Kroah-Hartman <greg@kroah.com>
Cc: Ian Abbott <abbotti@mev.co.uk>,
Frank Mori Hess <fmhess@users.sourceforge.net>,
linux-kernel@vger.kernel.org,
YAMANE Toshiaki <yamanetoshi@gmail.com>
Subject: [PATCH] staging/comedi: Use dev_ printks in drivers/me_daq.c
Date: Fri, 5 Oct 2012 09:07:27 +0900 [thread overview]
Message-ID: <1349395648-5976-1-git-send-email-yamanetoshi@gmail.com> (raw)
fixed below checkpatch warnings.
- WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...
- WARNING: quoted string split across lines
Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
---
drivers/staging/comedi/drivers/me_daq.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/comedi/drivers/me_daq.c b/drivers/staging/comedi/drivers/me_daq.c
index 2ce0b14..0d85729 100644
--- a/drivers/staging/comedi/drivers/me_daq.c
+++ b/drivers/staging/comedi/drivers/me_daq.c
@@ -384,8 +384,8 @@ static int me_ai_insn_read(struct comedi_device *dev,
(readw(dev_private->me_regbase +
ME_READ_AD_FIFO) ^ 0x800) & 0x0FFF;
} else {
- printk(KERN_ERR "comedi%d: Cannot get single value\n",
- dev->minor);
+ dev_err(dev->class_dev, "comedi%d: Cannot get single value\n",
+ dev->minor);
return -EIO;
}
@@ -566,8 +566,8 @@ static int me2600_xilinx_download(struct comedi_device *dev,
if (value & 0x20) {
/* Disable interrupt */
writel(0x00, dev_private->plx_regbase + PLX_INTCSR);
- printk(KERN_ERR "comedi%d: Xilinx download failed\n",
- dev->minor);
+ dev_err(dev->class_dev, "comedi%d: Xilinx download failed\n",
+ dev->minor);
return -EIO;
}
@@ -654,8 +654,9 @@ static int me_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
/* Enable PCI device and request PCI regions */
if (comedi_pci_enable(pcidev, dev->board_name) < 0) {
- printk(KERN_ERR "comedi%d: Failed to enable PCI device and "
- "request regions\n", dev->minor);
+ dev_err(dev->class_dev,
+ "comedi%d: Failed to enable PCI device and request regions\n",
+ dev->minor);
return -EIO;
}
@@ -666,7 +667,8 @@ static int me_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
ioremap(plx_regbase_tmp, plx_regbase_size_tmp);
dev_private->plx_regbase_size = plx_regbase_size_tmp;
if (!dev_private->plx_regbase) {
- printk("comedi%d: Failed to remap I/O memory\n", dev->minor);
+ dev_err(dev->class_dev,
+ "comedi%d: Failed to remap I/O memory\n", dev->minor);
return -ENOMEM;
}
@@ -676,11 +678,13 @@ static int me_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
swap_regbase_size_tmp = pci_resource_len(pcidev, 5);
if (!swap_regbase_tmp)
- printk(KERN_ERR "comedi%d: Swap not present\n", dev->minor);
+ dev_err(dev->class_dev,
+ "comedi%d: Swap not present\n", dev->minor);
/*---------------------------------------------- Workaround start ---*/
if (plx_regbase_tmp & 0x0080) {
- printk(KERN_ERR "comedi%d: PLX-Bug detected\n", dev->minor);
+ dev_err(dev->class_dev,
+ "comedi%d: PLX-Bug detected\n", dev->minor);
if (swap_regbase_tmp) {
regbase_tmp = plx_regbase_tmp;
@@ -716,8 +720,8 @@ static int me_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
dev_private->me_regbase_size = me_regbase_size_tmp;
dev_private->me_regbase = ioremap(me_regbase_tmp, me_regbase_size_tmp);
if (!dev_private->me_regbase) {
- printk(KERN_ERR "comedi%d: Failed to remap I/O memory\n",
- dev->minor);
+ dev_err(dev->class_dev,
+ "comedi%d: Failed to remap I/O memory\n", dev->minor);
return -ENOMEM;
}
--
1.7.9.5
next reply other threads:[~2012-10-05 0:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-05 0:07 YAMANE Toshiaki [this message]
2012-10-05 9:08 ` [PATCH] staging/comedi: Use dev_ printks in drivers/me_daq.c Ian Abbott
2012-10-05 9:34 ` Toshiaki Yamane
2012-10-06 5:31 ` YAMANE Toshiaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349395648-5976-1-git-send-email-yamanetoshi@gmail.com \
--to=yamanetoshi@gmail.com \
--cc=abbotti@mev.co.uk \
--cc=fmhess@users.sourceforge.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).