mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH V1 1/2] Staging: comedi: fix printk issue in cb_pcidda.c
@ 2011-10-03 13:48 Ravishankar Karkala Mallikarjunayya
  2011-10-03 13:48 ` [PATCH V1 2/2] Staging: comedi: fix printk issue in cb_pcidas.c Ravishankar Karkala Mallikarjunayya
  2011-10-17 22:06 ` [PATCH V1 1/2] Staging: comedi: fix printk issue in cb_pcidda.c Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Ravishankar Karkala Mallikarjunayya @ 2011-10-03 13:48 UTC (permalink / raw)
  To: gregkh, wfp5p; +Cc: devel, linux-kernel, Ravishankar Karkala Mallikarjunayya

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

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
---
I was not mentioned  printk("eeprom:") and 
 printk(" %i:0x%x ", index, devpriv->eeprom_data[index]); line in Earlier patch which is fixed.

 drivers/staging/comedi/drivers/cb_pcidda.c |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c
index 49102b3..da5b8e5 100644
--- a/drivers/staging/comedi/drivers/cb_pcidda.c
+++ b/drivers/staging/comedi/drivers/cb_pcidda.c
@@ -282,7 +282,8 @@ static int cb_pcidda_attach(struct comedi_device *dev,
 	struct pci_dev *pcidev = NULL;
 	int index;
 
-	printk("comedi%d: cb_pcidda: ", dev->minor);
+	dev_info(&pcidev->dev, "comedi%d: cb_pcidda:\n",
+		dev->minor);
 
 /*
  * Allocate the private structure area.
@@ -293,7 +294,6 @@ static int cb_pcidda_attach(struct comedi_device *dev,
 /*
  * Probe the device to determine what device in the series it is.
  */
-	printk("\n");
 
 	for_each_pci_dev(pcidev) {
 		if (pcidev->vendor == PCI_VENDOR_ID_CB) {
@@ -312,22 +312,24 @@ static int cb_pcidda_attach(struct comedi_device *dev,
 		}
 	}
 	if (!pcidev) {
-		printk
-		    ("Not a ComputerBoards/MeasurementComputing card on requested position\n");
+		dev_err(&pcidev->dev, "Not a "
+			"ComputerBoards/MeasurementComputing "
+			"card on requested position\n");
 		return -EIO;
 	}
 found:
 	devpriv->pci_dev = pcidev;
 	dev->board_ptr = cb_pcidda_boards + index;
 	/*  "thisboard" macro can be used from here. */
-	printk("Found %s at requested position\n", thisboard->name);
+	dev_info(&pcidev->dev, "Found %s at requested position\n",
+		thisboard->name);
 
 	/*
 	 * Enable PCI device and request regions.
 	 */
 	if (comedi_pci_enable(pcidev, thisboard->name)) {
-		printk
-		    ("cb_pcidda: failed to enable PCI device and request regions\n");
+		dev_err(&pcidev->dev, "cb_pcidda: failed to enable PCI "
+			"device and request regions\n");
 		return -EIO;
 	}
 
@@ -377,12 +379,12 @@ found:
 	s = dev->subdevices + 2;
 	subdev_8255_init(dev, s, NULL, devpriv->digitalio + PORT2A);
 
-	printk(" eeprom:");
+	dev_dbg(&pcidev->dev, "eeprom:\n");
 	for (index = 0; index < EEPROM_SIZE; index++) {
 		devpriv->eeprom_data[index] = cb_pcidda_read_eeprom(dev, index);
-		printk(" %i:0x%x ", index, devpriv->eeprom_data[index]);
+		dev_dbg(&pcidev->dev, "%i:0x%x\n", index,
+			devpriv->eeprom_data[index]);
 	}
-	printk("\n");
 
 	/*  set calibrations dacs */
 	for (index = 0; index < thisboard->ao_chans; index++)
@@ -417,7 +419,8 @@ static int cb_pcidda_detach(struct comedi_device *dev)
 		subdev_8255_cleanup(dev, dev->subdevices + 2);
 	}
 
-	printk("comedi%d: cb_pcidda: remove\n", dev->minor);
+	pr_info(&pcidev->dev, "comedi%d: cb_pcidda: remove\n",
+		dev->minor);
 
 	return 0;
 }
-- 
1.7.6.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-17 22:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-03 13:48 [PATCH V1 1/2] Staging: comedi: fix printk issue in cb_pcidda.c Ravishankar Karkala Mallikarjunayya
2011-10-03 13:48 ` [PATCH V1 2/2] Staging: comedi: fix printk issue in cb_pcidas.c Ravishankar Karkala Mallikarjunayya
2011-10-17 22:06 ` [PATCH V1 1/2] Staging: comedi: fix printk issue in cb_pcidda.c Greg KH

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®