Commit 74eabe4c authored by Szymon Janc's avatar Szymon Janc Committed by Greg Kroah-Hartman

Staging: quickstart: Use pr_err and pr_info for logs

Signed-off-by: default avatarSzymon Janc <szymon@janc.net.pl>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 451196a3
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#define QUICKSTART_VERSION "1.03" #define QUICKSTART_VERSION "1.03"
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -166,6 +168,7 @@ static void quickstart_acpi_notify(acpi_handle handle, u32 event, void *data) ...@@ -166,6 +168,7 @@ static void quickstart_acpi_notify(acpi_handle handle, u32 event, void *data)
input_sync(quickstart_input); input_sync(quickstart_input);
break; break;
default: default:
pr_err("Unexpected ACPI event notify (%u)\n", event);
break; break;
} }
} }
...@@ -183,8 +186,7 @@ static int quickstart_acpi_ghid(struct quickstart_acpi *quickstart) ...@@ -183,8 +186,7 @@ static int quickstart_acpi_ghid(struct quickstart_acpi *quickstart)
status = acpi_evaluate_object(quickstart->device->handle, "GHID", NULL, status = acpi_evaluate_object(quickstart->device->handle, "GHID", NULL,
&buffer); &buffer);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
printk(KERN_ERR "quickstart: %s GHID method failed.\n", pr_err("%s GHID method failed\n", quickstart->button->name);
quickstart->button->name);
return -EINVAL; return -EINVAL;
} }
...@@ -207,8 +209,7 @@ static int quickstart_acpi_ghid(struct quickstart_acpi *quickstart) ...@@ -207,8 +209,7 @@ static int quickstart_acpi_ghid(struct quickstart_acpi *quickstart)
quickstart->button->id = *(uint64_t *)buffer.pointer; quickstart->button->id = *(uint64_t *)buffer.pointer;
break; break;
default: default:
printk(KERN_ERR "quickstart: %s GHID method returned buffer " pr_err("%s GHID method returned buffer of unexpected length %u\n",
"of unexpected length %u\n",
quickstart->button->name, buffer.length); quickstart->button->name, buffer.length);
ret = -EINVAL; ret = -EINVAL;
break; break;
...@@ -269,7 +270,7 @@ static int quickstart_acpi_add(struct acpi_device *device) ...@@ -269,7 +270,7 @@ static int quickstart_acpi_add(struct acpi_device *device)
quickstart_acpi_notify, quickstart_acpi_notify,
quickstart); quickstart);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
printk(KERN_ERR "quickstart: Notify handler install error\n"); pr_err("Notify handler install error\n");
ret = -ENODEV; ret = -ENODEV;
goto fail_installnotify; goto fail_installnotify;
} }
...@@ -309,7 +310,7 @@ static int quickstart_acpi_remove(struct acpi_device *device, int type) ...@@ -309,7 +310,7 @@ static int quickstart_acpi_remove(struct acpi_device *device, int type)
status = acpi_remove_notify_handler(device->handle, ACPI_ALL_NOTIFY, status = acpi_remove_notify_handler(device->handle, ACPI_ALL_NOTIFY,
quickstart_acpi_notify); quickstart_acpi_notify);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
printk(KERN_ERR "quickstart: Error removing notify handler\n"); pr_err("Error removing notify handler\n");
kfree(quickstart); kfree(quickstart);
...@@ -435,8 +436,7 @@ static int __init quickstart_init(void) ...@@ -435,8 +436,7 @@ static int __init quickstart_init(void)
if (ret) if (ret)
goto fail_input; goto fail_input;
printk(KERN_INFO "quickstart: ACPI Direct App Launch ver %s\n", pr_info("ACPI Direct App Launch ver %s\n", QUICKSTART_VERSION);
QUICKSTART_VERSION);
return 0; return 0;
fail_input: fail_input:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment