linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] iio: core: Use pr_err instead of printk
@ 2013-10-24 11:53 Sachin Kamat
  2013-10-24 11:53 ` [PATCH 2/9] iio: core: Add misssing braces Sachin Kamat
                   ` (8 more replies)
  0 siblings, 9 replies; 18+ messages in thread
From: Sachin Kamat @ 2013-10-24 11:53 UTC (permalink / raw)
  To: linux-iio; +Cc: jic23, sachin.kamat

Use of pr_err is preferred to printk.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/iio/industrialio-core.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index f721157..e4780b4 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -9,6 +9,8 @@
  * Based on elements of hwmon and input subsystems.
  */
 
+#define pr_fmt(fmt) "iio-core: " fmt
+
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/idr.h>
@@ -132,16 +134,13 @@ static int __init iio_init(void)
 	/* Register sysfs bus */
 	ret  = bus_register(&iio_bus_type);
 	if (ret < 0) {
-		printk(KERN_ERR
-		       "%s could not register bus type\n",
-			__FILE__);
+		pr_err("could not register bus type\n");
 		goto error_nothing;
 	}
 
 	ret = alloc_chrdev_region(&iio_devt, 0, IIO_DEV_MAX, "iio");
 	if (ret < 0) {
-		printk(KERN_ERR "%s: failed to allocate char dev region\n",
-		       __FILE__);
+		pr_err("failed to allocate char dev region\n");
 		goto error_unregister_bus_type;
 	}
 
@@ -951,7 +950,7 @@ struct iio_dev *iio_device_alloc(int sizeof_priv)
 		dev->id = ida_simple_get(&iio_ida, 0, 0, GFP_KERNEL);
 		if (dev->id < 0) {
 			/* cannot use a dev_err as the name isn't available */
-			printk(KERN_ERR "Failed to get id\n");
+			pr_err("failed to get device id\n");
 			kfree(dev);
 			return NULL;
 		}
-- 
1.7.9.5


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

end of thread, other threads:[~2013-10-24 12:53 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-24 11:53 [PATCH 1/9] iio: core: Use pr_err instead of printk Sachin Kamat
2013-10-24 11:53 ` [PATCH 2/9] iio: core: Add misssing braces Sachin Kamat
2013-10-24 13:44   ` Jonathan Cameron
2013-10-24 11:53 ` [PATCH 3/9] iio: accel: kxsd9: Remove redundant variable Sachin Kamat
2013-10-24 13:44   ` Jonathan Cameron
2013-10-24 11:53 ` [PATCH 4/9] iio: adc: twl6030-gpadc: Remove redundant code Sachin Kamat
2013-10-24 13:49   ` Jonathan Cameron
2013-10-24 11:53 ` [PATCH 5/9] iio: dac: ad5421: " Sachin Kamat
2013-10-24 13:51   ` Jonathan Cameron
2013-10-24 11:53 ` [PATCH 6/9] iio: dac: ad5755: " Sachin Kamat
2013-10-24 13:51   ` Jonathan Cameron
2013-10-24 11:53 ` [PATCH 7/9] iio: dac: max517: Remove redundant variable Sachin Kamat
2013-10-24 13:52   ` Jonathan Cameron
2013-10-24 11:53 ` [PATCH 8/9] iio: dac: mcp4725: Remove redundant code Sachin Kamat
2013-10-24 13:53   ` Jonathan Cameron
2013-10-24 11:53 ` [PATCH 9/9] iio: light: vcnl4000: " Sachin Kamat
2013-10-24 13:53   ` Jonathan Cameron
2013-10-24 13:41 ` [PATCH 1/9] iio: core: Use pr_err instead of printk Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).