Skip to content

Commit

Permalink
Staging: comedi: fix printk issue in cb_pcimdas.c
Browse files Browse the repository at this point in the history
This is a patch to the cb_pcimdas.c file that fixes up a printk
warning found by the checkpatch.pl tool.

converted printks to dev_printk.
Removed unnecessary printk statements.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Ravishankar karkala Mallikarjunayya authored and Greg Kroah-Hartman committed Nov 27, 2011
1 parent 610b8ed commit 2c6abc5
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions drivers/staging/comedi/drivers/cb_pcimdas.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ static int cb_pcimdas_attach(struct comedi_device *dev,
int index;
/* int i; */

printk("comedi%d: cb_pcimdas: ", dev->minor);

/*
* Allocate the private structure area.
*/
Expand All @@ -223,7 +221,6 @@ static int cb_pcimdas_attach(struct comedi_device *dev,
/*
* Probe the device to determine what device in the series it is.
*/
printk("\n");

for_each_pci_dev(pcidev) {
/* is it not a computer boards card? */
Expand All @@ -248,26 +245,26 @@ static int cb_pcimdas_attach(struct comedi_device *dev,
}
}

printk("No supported ComputerBoards/MeasurementComputing card found on "
"requested position\n");
dev_err(dev->hw_dev, "No supported ComputerBoards/MeasurementComputing card found on requested position\n");
return -EIO;

found:

printk("Found %s on bus %i, slot %i\n", cb_pcimdas_boards[index].name,
pcidev->bus->number, PCI_SLOT(pcidev->devfn));
dev_dbg(dev->hw_dev, "Found %s on bus %i, slot %i\n",
cb_pcimdas_boards[index].name, pcidev->bus->number,
PCI_SLOT(pcidev->devfn));

/* Warn about non-tested features */
switch (thisboard->device_id) {
case 0x56:
break;
default:
printk("THIS CARD IS UNSUPPORTED.\n"
"PLEASE REPORT USAGE TO <mocelet@sucs.org>\n");
dev_dbg(dev->hw_dev, "THIS CARD IS UNSUPPORTED.\n"
"PLEASE REPORT USAGE TO <mocelet@sucs.org>\n");
}

if (comedi_pci_enable(pcidev, "cb_pcimdas")) {
printk(" Failed to enable PCI device and request regions\n");
dev_err(dev->hw_dev, "Failed to enable PCI device and request regions\n");
return -EIO;
}

Expand Down Expand Up @@ -333,8 +330,6 @@ static int cb_pcimdas_attach(struct comedi_device *dev,
else
s->type = COMEDI_SUBD_UNUSED;

printk("attached\n");

return 1;
}

Expand Down

0 comments on commit 2c6abc5

Please sign in to comment.