summaryrefslogtreecommitdiff
path: root/drivers/staging/android
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-06-05 16:40:10 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-12 11:20:17 -0700
commitc810a399798022d545191e2daaca0368623c15d3 (patch)
treeda626a81e429ce6cc5b9fe098fd0bdceb22493ed /drivers/staging/android
parent2f0b9d082e5d0056a3aca4be038483a564849196 (diff)
staging: Android: Fix some checkpatch warnings
Warnings reported by checkpatch.pl have been fixed. Cc: Brian Swetland <swetland@google.com> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android')
-rw-r--r--drivers/staging/android/ashmem.c14
-rw-r--r--drivers/staging/android/logger.c10
-rw-r--r--drivers/staging/android/ram_console.c4
-rw-r--r--drivers/staging/android/timed_output.c4
4 files changed, 20 insertions, 12 deletions
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index e84dbecd0991..69cf2db1d69c 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -16,6 +16,8 @@
** GNU General Public License for more details.
*/
+#define pr_fmt(fmt) "ashmem: " fmt
+
#include <linux/module.h>
#include <linux/file.h>
#include <linux/fs.h>
@@ -707,7 +709,7 @@ static int __init ashmem_init(void)
sizeof(struct ashmem_area),
0, 0, NULL);
if (unlikely(!ashmem_area_cachep)) {
- printk(KERN_ERR "ashmem: failed to create slab cache\n");
+ pr_err("failed to create slab cache\n");
return -ENOMEM;
}
@@ -715,19 +717,19 @@ static int __init ashmem_init(void)
sizeof(struct ashmem_range),
0, 0, NULL);
if (unlikely(!ashmem_range_cachep)) {
- printk(KERN_ERR "ashmem: failed to create slab cache\n");
+ pr_err("failed to create slab cache\n");
return -ENOMEM;
}
ret = misc_register(&ashmem_misc);
if (unlikely(ret)) {
- printk(KERN_ERR "ashmem: failed to register misc device!\n");
+ pr_err("failed to register misc device!\n");
return ret;
}
register_shrinker(&ashmem_shrinker);
- printk(KERN_INFO "ashmem: initialized\n");
+ pr_info("initialized\n");
return 0;
}
@@ -740,12 +742,12 @@ static void __exit ashmem_exit(void)
ret = misc_deregister(&ashmem_misc);
if (unlikely(ret))
- printk(KERN_ERR "ashmem: failed to unregister misc device!\n");
+ pr_err("failed to unregister misc device!\n");
kmem_cache_destroy(ashmem_range_cachep);
kmem_cache_destroy(ashmem_area_cachep);
- printk(KERN_INFO "ashmem: unloaded\n");
+ pr_info("unloaded\n");
}
module_init(ashmem_init);
diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c
index b2e71c6fd175..f7b8237d5be7 100644
--- a/drivers/staging/android/logger.c
+++ b/drivers/staging/android/logger.c
@@ -17,6 +17,8 @@
* GNU General Public License for more details.
*/
+#define pr_fmt(fmt) "logger: " fmt
+
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/fs.h>
@@ -621,13 +623,13 @@ static int __init create_log(char *log_name, int size)
/* finally, initialize the misc device for this log */
ret = misc_register(&log->misc);
if (unlikely(ret)) {
- printk(KERN_ERR "logger: failed to register misc "
- "device for log '%s'!\n", log->misc.name);
+ pr_err("failed to register misc device for log '%s'!\n",
+ log->misc.name);
goto out_free_log;
}
- printk(KERN_INFO "logger: created %luK log '%s'\n",
- (unsigned long) log->size >> 10, log->misc.name);
+ pr_info("created %luK log '%s'\n",
+ (unsigned long) log->size >> 10, log->misc.name);
return 0;
diff --git a/drivers/staging/android/ram_console.c b/drivers/staging/android/ram_console.c
index 82323bb1d1a3..7add022b1c22 100644
--- a/drivers/staging/android/ram_console.c
+++ b/drivers/staging/android/ram_console.c
@@ -13,6 +13,8 @@
*
*/
+#define pr_fmt(fmt) "ram_console: " fmt
+
#include <linux/console.h>
#include <linux/init.h>
#include <linux/module.h>
@@ -162,7 +164,7 @@ static int __init ram_console_late_init(void)
entry = create_proc_entry("last_kmsg", S_IFREG | S_IRUGO, NULL);
if (!entry) {
- printk(KERN_ERR "ram_console: failed to create proc entry\n");
+ pr_err("failed to create proc entry\n");
persistent_ram_free_old(prz);
return 0;
}
diff --git a/drivers/staging/android/timed_output.c b/drivers/staging/android/timed_output.c
index 38d930cadad3..ec9e2ae2de0d 100644
--- a/drivers/staging/android/timed_output.c
+++ b/drivers/staging/android/timed_output.c
@@ -14,6 +14,8 @@
*
*/
+#define pr_fmt(fmt) "timed_output: " fmt
+
#include <linux/module.h>
#include <linux/types.h>
#include <linux/device.h>
@@ -90,7 +92,7 @@ int timed_output_dev_register(struct timed_output_dev *tdev)
err_create_file:
device_destroy(timed_output_class, MKDEV(0, tdev->index));
- printk(KERN_ERR "timed_output: Failed to register driver %s\n",
+ pr_err("failed to register driver %s\n",
tdev->name);
return ret;