[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1325680806-10917-4-git-send-email-ravishankar.km@greenturtles.in>
Date: Wed, 4 Jan 2012 18:09:59 +0530
From: Ravishankar karkala Mallikarjunayya
<ravishankar.km@...enturtles.in>
To: gregkh@...e.de, wfp5p@...ginia.edu
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
dan.carpenter@...cle.com, rmallon@...il.com, joe@...ches.com,
valdis.kletnieks@...edu,
Ravishankar karkala Mallikarjunayya
<ravishankar.km@...enturtles.in>
Subject: [PATCH 04/11] Staging: comedi: fix printk warning issue in cb_pcimdda.c
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@...enturtles.in>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists