Commit be545c62 authored by Ravishankar karkala Mallikarjunayya's avatar Ravishankar karkala Mallikarjunayya Committed by Greg Kroah-Hartman

Staging: comedi: fix printk issue in adv_pci1710.c

This is a patch to the adv_pci1710.c file that fixes up a printk
warning found by the checkpatch.pl tool.

Converted printks to dev_version and Removed an unnecessary printk
statements.
Signed-off-by: default avatarRavishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4547251f
...@@ -1382,16 +1382,14 @@ static int pci1710_attach(struct comedi_device *dev, ...@@ -1382,16 +1382,14 @@ static int pci1710_attach(struct comedi_device *dev,
int i; int i;
int board_index; int board_index;
printk("comedi%d: adv_pci1710: ", dev->minor); dev_info(dev->hw_dev, "comedi%d: adv_pci1710:\n", dev->minor);
opt_bus = it->options[0]; opt_bus = it->options[0];
opt_slot = it->options[1]; opt_slot = it->options[1];
ret = alloc_private(dev, sizeof(struct pci1710_private)); ret = alloc_private(dev, sizeof(struct pci1710_private));
if (ret < 0) { if (ret < 0)
printk(" - Allocation failed!\n");
return -ENOMEM; return -ENOMEM;
}
/* Look for matching PCI device */ /* Look for matching PCI device */
errstr = "not found!"; errstr = "not found!";
...@@ -1436,10 +1434,10 @@ static int pci1710_attach(struct comedi_device *dev, ...@@ -1436,10 +1434,10 @@ static int pci1710_attach(struct comedi_device *dev,
if (!pcidev) { if (!pcidev) {
if (opt_bus || opt_slot) { if (opt_bus || opt_slot) {
printk(" - Card at b:s %d:%d %s\n", dev_err(dev->hw_dev, "- Card at b:s %d:%d %s\n",
opt_bus, opt_slot, errstr); opt_bus, opt_slot, errstr);
} else { } else {
printk(" - Card %s\n", errstr); dev_err(dev->hw_dev, "- Card %s\n", errstr);
} }
return -EIO; return -EIO;
} }
...@@ -1450,8 +1448,8 @@ static int pci1710_attach(struct comedi_device *dev, ...@@ -1450,8 +1448,8 @@ static int pci1710_attach(struct comedi_device *dev,
irq = pcidev->irq; irq = pcidev->irq;
iobase = pci_resource_start(pcidev, 2); iobase = pci_resource_start(pcidev, 2);
printk(", b:s:f=%d:%d:%d, io=0x%4lx", pci_bus, pci_slot, pci_func, dev_dbg(dev->hw_dev, "b:s:f=%d:%d:%d, io=0x%4lx\n", pci_bus, pci_slot,
iobase); pci_func, iobase);
dev->iobase = iobase; dev->iobase = iobase;
...@@ -1471,10 +1469,8 @@ static int pci1710_attach(struct comedi_device *dev, ...@@ -1471,10 +1469,8 @@ static int pci1710_attach(struct comedi_device *dev,
n_subdevices++; n_subdevices++;
ret = alloc_subdevices(dev, n_subdevices); ret = alloc_subdevices(dev, n_subdevices);
if (ret < 0) { if (ret < 0)
printk(" - Allocation failed!\n");
return ret; return ret;
}
pci1710_reset(dev); pci1710_reset(dev);
...@@ -1483,24 +1479,20 @@ static int pci1710_attach(struct comedi_device *dev, ...@@ -1483,24 +1479,20 @@ static int pci1710_attach(struct comedi_device *dev,
if (request_irq(irq, interrupt_service_pci1710, if (request_irq(irq, interrupt_service_pci1710,
IRQF_SHARED, "Advantech PCI-1710", IRQF_SHARED, "Advantech PCI-1710",
dev)) { dev)) {
printk dev_dbg(dev->hw_dev, "unable to allocate IRQ %d, DISABLING IT",
(", unable to allocate IRQ %d, DISABLING IT", irq);
irq);
irq = 0; /* Can't use IRQ */ irq = 0; /* Can't use IRQ */
} else { } else {
printk(", irq=%u", irq); dev_dbg(dev->hw_dev, "irq=%u", irq);
} }
} else { } else {
printk(", IRQ disabled"); dev_dbg(dev->hw_dev, "IRQ disabled");
} }
} else { } else {
irq = 0; irq = 0;
} }
dev->irq = irq; dev->irq = irq;
printk(".\n");
subdev = 0; subdev = 0;
if (this_board->n_aichan) { if (this_board->n_aichan) {
......
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