* [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
* [PATCH V1 2/2] Staging: comedi: fix printk issue in cb_pcidas.c
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 ` Ravishankar Karkala Mallikarjunayya
2011-10-17 22:06 ` [PATCH V1 1/2] Staging: comedi: fix printk issue in cb_pcidda.c Greg KH
1 sibling, 0 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_pcidas.c file that fixes up a printk warning found by the checkpatch.pl tool
Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in>
---
Space issue is fixed.
drivers/staging/comedi/drivers/cb_pcidas.c | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c b/drivers/staging/comedi/drivers/cb_pcidas.c
index 9dec153..1fc8db4 100644
--- a/drivers/staging/comedi/drivers/cb_pcidas.c
+++ b/drivers/staging/comedi/drivers/cb_pcidas.c
@@ -565,7 +565,8 @@ static int cb_pcidas_attach(struct comedi_device *dev,
int index;
int i;
- pr_info("comedi%d: cb_pcidas: ", dev->minor);
+ dev_info(&pcidev->dev, "comedi%d: cb_pcidas:\n",
+ dev->minor);
/*
* Allocate the private structure area.
@@ -576,7 +577,6 @@ static int cb_pcidas_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? */
@@ -600,20 +600,24 @@ static int cb_pcidas_attach(struct comedi_device *dev,
}
}
- printk("No supported ComputerBoards/MeasurementComputing card found on "
- "requested position\n");
+ dev_err(&pcidev->dev,"No supported "
+ "ComputerBoards/MeasurementComputing "
+ "card found on requested position\n");
return -EIO;
found:
- printk("Found %s on bus %i, slot %i\n", cb_pcidas_boards[index].name,
- pcidev->bus->number, PCI_SLOT(pcidev->devfn));
+ dev_info(&pcidev->dev, "Found %s on bus %i, slot %i\n",
+ cb_pcidas_boards[index].name,
+ pcidev->bus->number,
+ PCI_SLOT(pcidev->devfn));
/*
* Enable PCI device and reserve I/O ports.
*/
if (comedi_pci_enable(pcidev, "cb_pcidas")) {
- printk(" Failed to enable PCI device and request regions\n");
+ dev_err(&pcidev->dev,"Failed to enable PCI "
+ "device and request regions\n");
return -EIO;
}
/*
@@ -639,7 +643,8 @@ found:
/* get irq */
if (request_irq(devpriv->pci_dev->irq, cb_pcidas_interrupt,
IRQF_SHARED, "cb_pcidas", dev)) {
- printk(" unable to allocate irq %d\n", devpriv->pci_dev->irq);
+ dev_warn(&pcidev->dev, "unable to allocate irq %d\n",
+ devpriv->pci_dev->irq);
return -EINVAL;
}
dev->irq = devpriv->pci_dev->irq;
@@ -768,7 +773,8 @@ found:
*/
static int cb_pcidas_detach(struct comedi_device *dev)
{
- pr_info("comedi%d: cb_pcidas: remove\n", dev->minor);
+ pr_info(&pcidev->dev, "comedi%d: cb_pcidas: remove\n",
+ dev->minor);
if (devpriv) {
if (devpriv->s5933_config) {
--
1.7.6.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V1 1/2] Staging: comedi: fix printk issue in cb_pcidda.c
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 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2011-10-17 22:06 UTC (permalink / raw)
To: Ravishankar Karkala Mallikarjunayya; +Cc: gregkh, wfp5p, devel, linux-kernel
On Mon, Oct 03, 2011 at 07:18:12PM +0530, Ravishankar Karkala Mallikarjunayya wrote:
> 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");
Please don't break strings across lines like this, just put them all on
one line.
greg k-h
^ 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®