[PATCH 04/11] Staging: comedi: fix printk warning issue in cb_pcimdda.c

From: Ravishankar karkala Mallikarjunayya
Date: Wed Jan 04 2012 - 07:42:21 EST


This patch fixes a printk warning found by the checkpatch.pl
tool.
Convert printk to dev_<levels>.
Convert multiple printk message to single printk message.
Removes useless printk messages.

Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@xxxxxxxxxxxxxxx>
---
drivers/staging/comedi/drivers/cb_pcimdda.c | 19 ++++++-------------
1 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/comedi/drivers/cb_pcimdda.c b/drivers/staging/comedi/drivers/cb_pcimdda.c
index 40bddfa..8f5b2fe 100644
--- a/drivers/staging/comedi/drivers/cb_pcimdda.c
+++ b/drivers/staging/comedi/drivers/cb_pcimdda.c
@@ -301,9 +301,6 @@ static int attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (err)
return err;

-/* Output some info */
- printk("comedi%d: %s: ", dev->minor, thisboard->name);
-
/*
* Initialize dev->board_name. Note that we can use the "thisboard"
* macro now, since we just initialized it in the last line.
@@ -346,7 +343,7 @@ static int attach(struct comedi_device *dev, struct comedi_devconfig *it)
break;
case DIO_INTERNAL:
default:
- printk("DIO_INTERNAL not implemented yet!\n");
+ dev_warn(dev->hw_dev, "DIO_INTERNAL not implemented yet!\n");
return -ENXIO;
break;
}
@@ -356,7 +353,8 @@ static int attach(struct comedi_device *dev, struct comedi_devconfig *it)

devpriv->attached_successfully = 1;

- printk("attached\n");
+ dev_info(dev->hw_dev, "comedi%d: %s: attached\n", dev->minor,
+ thisboard->name);

return 1;
}
@@ -386,8 +384,8 @@ static int detach(struct comedi_device *dev)
}

if (devpriv->attached_successfully && thisboard)
- printk("comedi%d: %s: detached\n", dev->minor,
- thisboard->name);
+ dev_info(dev->hw_dev, "comedi%d: %s: detached\n",
+ dev->minor, thisboard->name);

}

@@ -496,11 +494,8 @@ static int probe(struct comedi_device *dev, const struct comedi_devconfig *it)

devpriv->pci_dev = pcidev;
dev->board_ptr = boards + index;
- if (comedi_pci_enable(pcidev, thisboard->name)) {
- printk
- ("cb_pcimdda: Failed to enable PCI device and request regions\n");
+ if (comedi_pci_enable(pcidev, thisboard->name))
return -EIO;
- }
registers =
pci_resource_start(devpriv->pci_dev,
REGS_BADRINDEX);
@@ -511,7 +506,5 @@ static int probe(struct comedi_device *dev, const struct comedi_devconfig *it)
}
}

- printk("cb_pcimdda: No supported ComputerBoards/MeasurementComputing "
- "card found at the requested position\n");
return -ENODEV;
}
--
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/