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/adl_pci9118.c
Date: Sat, 3 Nov 2012 22:38:03 +0900 [thread overview]
Message-ID: <1351949883-16164-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 ...
Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com>
---
drivers/staging/comedi/drivers/adl_pci9118.c | 31 ++++++++++++++------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c
index a5d0be2..e9d45c2 100644
--- a/drivers/staging/comedi/drivers/adl_pci9118.c
+++ b/drivers/staging/comedi/drivers/adl_pci9118.c
@@ -1888,7 +1888,7 @@ static struct pci_dev *pci9118_find_pci(struct comedi_device *dev,
*/
if (comedi_pci_enable(pcidev, "adl_pci9118"))
continue;
- printk(KERN_ERR ", b:s:f=%d:%d:%d, io=0x%4lx, 0x%4lx",
+ dev_err(dev->class_dev, ", b:s:f=%d:%d:%d, io=0x%4lx, 0x%4lx",
pcidev->bus->number,
PCI_SLOT(pcidev->devfn),
PCI_FUNC(pcidev->devfn),
@@ -1896,9 +1896,9 @@ static struct pci_dev *pci9118_find_pci(struct comedi_device *dev,
(unsigned long)pci_resource_start(pcidev, 0));
return pcidev;
}
- printk(KERN_ERR
- "comedi%d: no supported board found! (req. bus/slot : %d/%d)\n",
- dev->minor, bus, slot);
+ dev_err(dev->class_dev,
+ "no supported board found! (req. bus/slot : %d/%d)\n",
+ bus, slot);
return NULL;
}
@@ -1914,7 +1914,7 @@ static int pci9118_attach(struct comedi_device *dev,
unsigned int irq;
u16 u16w;
- printk("comedi%d: adl_pci9118: board=%s", dev->minor, this_board->name);
+ dev_dbg(dev->class_dev, "board=%s", this_board->name);
if (it->options[3] & 1)
master = 0; /* user don't want use bus master */
@@ -1947,14 +1947,15 @@ static int pci9118_attach(struct comedi_device *dev,
if (irq > 0) {
if (request_irq(irq, interrupt_pci9118, IRQF_SHARED,
"ADLink PCI-9118", dev)) {
- printk(", unable to allocate IRQ %d, DISABLING IT",
- irq);
+ dev_dbg(dev->class_dev,
+ ", unable to allocate IRQ %d, DISABLING IT",
+ irq);
irq = 0; /* Can't use IRQ */
} else {
- printk(", irq=%u", irq);
+ dev_dbg(dev->class_dev, ", irq=%u", irq);
}
} else {
- printk(", IRQ disabled");
+ dev_dbg(dev->class_dev, ", IRQ disabled");
}
dev->irq = irq;
@@ -1980,7 +1981,8 @@ static int pci9118_attach(struct comedi_device *dev,
}
}
if (!devpriv->dmabuf_virt[0]) {
- printk(", Can't allocate DMA buffer, DMA disabled!");
+ dev_dbg(dev->class_dev,
+ ", Can't allocate DMA buffer, DMA disabled!");
master = 0;
}
@@ -1991,9 +1993,9 @@ static int pci9118_attach(struct comedi_device *dev,
devpriv->master = master;
if (devpriv->master)
- printk(", bus master");
+ dev_dbg(dev->class_dev, ", bus master");
else
- printk(", no bus master");
+ dev_dbg(dev->class_dev, ", no bus master");
devpriv->usemux = 0;
if (it->options[2] > 0) {
@@ -2005,7 +2007,8 @@ static int pci9118_attach(struct comedi_device *dev,
devpriv->usemux = 128;
/* max 128 channels with softare S&H! */
}
- printk(", ext. mux %d channels", devpriv->usemux);
+ dev_dbg(dev->class_dev,
+ ", ext. mux %d channels", devpriv->usemux);
}
devpriv->softsshdelay = it->options[4];
@@ -2019,7 +2022,7 @@ static int pci9118_attach(struct comedi_device *dev,
devpriv->softsshhold = 0x80;
}
- printk(".\n");
+ dev_dbg(dev->class_dev, ".\n");
pci_read_config_word(pcidev, PCI_COMMAND, &u16w);
pci_write_config_word(pcidev, PCI_COMMAND, u16w | 64);
--
1.7.9.5
next reply other threads:[~2012-11-03 13:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-03 13:38 YAMANE Toshiaki [this message]
2012-11-13 19:20 ` Greg Kroah-Hartman
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=1351949883-16164-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
all inboxes | Powered by JetHome®