diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-10-24 07:53:00 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2013-10-24 09:39:48 -0400 |
commit | 3176dd5d3b591b22abe28dc0f3aace089f10ebe7 (patch) | |
tree | c6ba12b2b3c17ecf6c1613cd2839318165125d76 /drivers/iio/industrialio-core.c | |
parent | d141ab776b670a0c9ac46b174f4c207a81f89f60 (diff) |
iio: core: Use pr_err instead of printk
Use of pr_err is preferred to printk.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/industrialio-core.c')
-rw-r--r-- | drivers/iio/industrialio-core.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index f7211576abe5..e4780b41ae04 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * Based on elements of hwmon and input subsystems. | 9 | * Based on elements of hwmon and input subsystems. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) "iio-core: " fmt | ||
13 | |||
12 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
13 | #include <linux/module.h> | 15 | #include <linux/module.h> |
14 | #include <linux/idr.h> | 16 | #include <linux/idr.h> |
@@ -132,16 +134,13 @@ static int __init iio_init(void) | |||
132 | /* Register sysfs bus */ | 134 | /* Register sysfs bus */ |
133 | ret = bus_register(&iio_bus_type); | 135 | ret = bus_register(&iio_bus_type); |
134 | if (ret < 0) { | 136 | if (ret < 0) { |
135 | printk(KERN_ERR | 137 | pr_err("could not register bus type\n"); |
136 | "%s could not register bus type\n", | ||
137 | __FILE__); | ||
138 | goto error_nothing; | 138 | goto error_nothing; |
139 | } | 139 | } |
140 | 140 | ||
141 | ret = alloc_chrdev_region(&iio_devt, 0, IIO_DEV_MAX, "iio"); | 141 | ret = alloc_chrdev_region(&iio_devt, 0, IIO_DEV_MAX, "iio"); |
142 | if (ret < 0) { | 142 | if (ret < 0) { |
143 | printk(KERN_ERR "%s: failed to allocate char dev region\n", | 143 | pr_err("failed to allocate char dev region\n"); |
144 | __FILE__); | ||
145 | goto error_unregister_bus_type; | 144 | goto error_unregister_bus_type; |
146 | } | 145 | } |
147 | 146 | ||
@@ -951,7 +950,7 @@ struct iio_dev *iio_device_alloc(int sizeof_priv) | |||
951 | dev->id = ida_simple_get(&iio_ida, 0, 0, GFP_KERNEL); | 950 | dev->id = ida_simple_get(&iio_ida, 0, 0, GFP_KERNEL); |
952 | if (dev->id < 0) { | 951 | if (dev->id < 0) { |
953 | /* cannot use a dev_err as the name isn't available */ | 952 | /* cannot use a dev_err as the name isn't available */ |
954 | printk(KERN_ERR "Failed to get id\n"); | 953 | pr_err("failed to get device id\n"); |
955 | kfree(dev); | 954 | kfree(dev); |
956 | return NULL; | 955 | return NULL; |
957 | } | 956 | } |