Commit 37a836b1 authored by YAMANE Toshiaki's avatar YAMANE Toshiaki Committed by Greg Kroah-Hartman

staging/comedi: Use pr_ or dev_ printks in drivers/gsc_hpdi.c

fixed below checkpatch warning.
- WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev, ... then pr_warn(...  to printk(KERN_WARNING ...

some of them have been replaced by dev_dbg.
Signed-off-by: default avatarYAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ea50aab5
...@@ -479,7 +479,7 @@ static int hpdi_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -479,7 +479,7 @@ static int hpdi_attach(struct comedi_device *dev, struct comedi_devconfig *it)
int i; int i;
int retval; int retval;
printk(KERN_WARNING "comedi%d: gsc_hpdi\n", dev->minor); dev_dbg(dev->class_dev, "gsc_hpdi\n");
devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
if (!devpriv) if (!devpriv)
...@@ -510,17 +510,17 @@ static int hpdi_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -510,17 +510,17 @@ static int hpdi_attach(struct comedi_device *dev, struct comedi_devconfig *it)
} while (pcidev != NULL); } while (pcidev != NULL);
} }
if (dev->board_ptr == NULL) { if (dev->board_ptr == NULL) {
printk(KERN_WARNING "gsc_hpdi: no hpdi card found\n"); dev_warn(dev->class_dev, "no hpdi card found\n");
return -EIO; return -EIO;
} }
printk(KERN_WARNING dev_warn(dev->class_dev,
"gsc_hpdi: found %s on bus %i, slot %i\n", board(dev)->name, "found %s on bus %i, slot %i\n", board(dev)->name,
pcidev->bus->number, PCI_SLOT(pcidev->devfn)); pcidev->bus->number, PCI_SLOT(pcidev->devfn));
if (comedi_pci_enable(pcidev, dev->driver->driver_name)) { if (comedi_pci_enable(pcidev, dev->driver->driver_name)) {
printk(KERN_WARNING dev_warn(dev->class_dev,
" failed enable PCI device and request regions\n"); "failed enable PCI device and request regions\n");
return -EIO; return -EIO;
} }
pci_set_master(pcidev); pci_set_master(pcidev);
...@@ -541,7 +541,7 @@ static int hpdi_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -541,7 +541,7 @@ static int hpdi_attach(struct comedi_device *dev, struct comedi_devconfig *it)
ioremap(devpriv->hpdi_phys_iobase, ioremap(devpriv->hpdi_phys_iobase,
pci_resource_len(pcidev, HPDI_BADDRINDEX)); pci_resource_len(pcidev, HPDI_BADDRINDEX));
if (!devpriv->plx9080_iobase || !devpriv->hpdi_iobase) { if (!devpriv->plx9080_iobase || !devpriv->hpdi_iobase) {
printk(KERN_WARNING " failed to remap io memory\n"); dev_warn(dev->class_dev, "failed to remap io memory\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -553,13 +553,13 @@ static int hpdi_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -553,13 +553,13 @@ static int hpdi_attach(struct comedi_device *dev, struct comedi_devconfig *it)
/* get irq */ /* get irq */
if (request_irq(pcidev->irq, handle_interrupt, IRQF_SHARED, if (request_irq(pcidev->irq, handle_interrupt, IRQF_SHARED,
dev->driver->driver_name, dev)) { dev->driver->driver_name, dev)) {
printk(KERN_WARNING dev_warn(dev->class_dev,
" unable to allocate irq %u\n", pcidev->irq); "unable to allocate irq %u\n", pcidev->irq);
return -EINVAL; return -EINVAL;
} }
dev->irq = pcidev->irq; dev->irq = pcidev->irq;
printk(KERN_WARNING " irq %u\n", dev->irq); dev_dbg(dev->class_dev, " irq %u\n", dev->irq);
/* allocate pci dma buffers */ /* allocate pci dma buffers */
for (i = 0; i < NUM_DMA_BUFFERS; i++) { for (i = 0; i < NUM_DMA_BUFFERS; i++) {
...@@ -577,8 +577,8 @@ static int hpdi_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -577,8 +577,8 @@ static int hpdi_attach(struct comedi_device *dev, struct comedi_devconfig *it)
&devpriv-> &devpriv->
dma_desc_phys_addr); dma_desc_phys_addr);
if (devpriv->dma_desc_phys_addr & 0xf) { if (devpriv->dma_desc_phys_addr & 0xf) {
printk(KERN_WARNING dev_warn(dev->class_dev,
" dma descriptors not quad-word aligned (bug)\n"); " dma descriptors not quad-word aligned (bug)\n");
return -EIO; return -EIO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment