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

Staging: comedi: fix printk issue in adv_pci_dio.c

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

converted printks to dev_version.
Removed 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 e75aca92
...@@ -1106,13 +1106,10 @@ static int pci_dio_attach(struct comedi_device *dev, ...@@ -1106,13 +1106,10 @@ static int pci_dio_attach(struct comedi_device *dev,
unsigned long iobase; unsigned long iobase;
struct pci_dev *pcidev = NULL; struct pci_dev *pcidev = NULL;
printk("comedi%d: adv_pci_dio: ", dev->minor);
ret = alloc_private(dev, sizeof(struct pci_dio_private)); ret = alloc_private(dev, sizeof(struct pci_dio_private));
if (ret < 0) { if (ret < 0)
printk(", Error: Cann't allocate private memory!\n");
return -ENOMEM; return -ENOMEM;
}
for_each_pci_dev(pcidev) { for_each_pci_dev(pcidev) {
/* loop through cards supported by this driver */ /* loop through cards supported by this driver */
...@@ -1140,17 +1137,16 @@ static int pci_dio_attach(struct comedi_device *dev, ...@@ -1140,17 +1137,16 @@ static int pci_dio_attach(struct comedi_device *dev,
} }
if (!dev->board_ptr) { if (!dev->board_ptr) {
printk(", Error: Requested type of the card was not found!\n"); dev_err(dev->hw_dev, "Error: Requested type of the card was not found!\n");
return -EIO; return -EIO;
} }
if (comedi_pci_enable(pcidev, driver_pci_dio.driver_name)) { if (comedi_pci_enable(pcidev, driver_pci_dio.driver_name)) {
printk dev_err(dev->hw_dev, "Error: Can't enable PCI device and request regions!\n");
(", Error: Can't enable PCI device and request regions!\n");
return -EIO; return -EIO;
} }
iobase = pci_resource_start(pcidev, this_board->main_pci_region); iobase = pci_resource_start(pcidev, this_board->main_pci_region);
printk(", b:s:f=%d:%d:%d, io=0x%4lx", dev_dbg(dev->hw_dev, "b:s:f=%d:%d:%d, io=0x%4lx\n",
pcidev->bus->number, PCI_SLOT(pcidev->devfn), pcidev->bus->number, PCI_SLOT(pcidev->devfn),
PCI_FUNC(pcidev->devfn), iobase); PCI_FUNC(pcidev->devfn), iobase);
...@@ -1177,15 +1173,10 @@ static int pci_dio_attach(struct comedi_device *dev, ...@@ -1177,15 +1173,10 @@ static int pci_dio_attach(struct comedi_device *dev,
} }
ret = alloc_subdevices(dev, n_subdevices); ret = alloc_subdevices(dev, n_subdevices);
if (ret < 0) { if (ret < 0)
printk(", Error: Cann't allocate subdevice memory!\n");
return ret; return ret;
}
printk(".\n");
subdev = 0; subdev = 0;
for (i = 0; i < MAX_DI_SUBDEVS; i++) for (i = 0; i < MAX_DI_SUBDEVS; i++)
if (this_board->sdi[i].chans) { if (this_board->sdi[i].chans) {
s = dev->subdevices + subdev; s = dev->subdevices + subdev;
......
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