From: malattia@linux.it
To: lenb@kernel.org
Cc: linux-acpi@vger.kernel.org, akpm@linux-foundation.org,
stelian@popies.net
Subject: [patch 3/9] Add debug macros also used by the sonypi reimplementation
Date: Mon, 9 Apr 2007 19:22:44 +0200 [thread overview]
Message-ID: <20070409172244.GD10646@inferi.kami.home> (raw)
In-Reply-To: 20070409081903.057292676@linux.it
[-- Attachment #1: 0003-introduce-debug-macros.patch --]
[-- Type: text/plain, Size: 2179 bytes --]
Signed-off-by: Mattia Dongili <malattia@linux.it>
---
drivers/misc/sony-laptop.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
Index: linux-2.6/drivers/misc/sony-laptop.c
===================================================================
--- linux-2.6.orig/drivers/misc/sony-laptop.c 2007-03-18 18:50:17.769519953 +0100
+++ linux-2.6/drivers/misc/sony-laptop.c 2007-03-18 18:50:26.270004320 +0100
@@ -35,6 +35,11 @@
#include <acpi/acpi_bus.h>
#include <asm/uaccess.h>
+#define LOG_PFX KERN_WARNING "sony-laptop: "
+#define dprintk(msg...) do { \
+ if (debug) printk(KERN_WARNING LOG_PFX msg); \
+} while (0)
+
#define SONY_NC_CLASS "sony"
#define SONY_NC_HID "SNY5001"
#define SONY_NC_DRIVER_NAME "ACPI Sony Notebook Control Driver v0.4"
@@ -43,8 +48,6 @@
0-based values */
#define SONY_MAX_BRIGHTNESS 8
-#define LOG_PFX KERN_WARNING "sony-laptop: "
-
MODULE_AUTHOR("Stelian Pop, Mattia Dongili");
MODULE_DESCRIPTION(SONY_NC_DRIVER_NAME);
MODULE_LICENSE("GPL");
@@ -368,8 +371,7 @@ static struct backlight_ops sony_backlig
*/
static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
{
- if (debug)
- printk(LOG_PFX "sony_acpi_notify, event: %d\n", event);
+ dprintk("sony_acpi_notify, event: %d\n", event);
acpi_bus_generate_event(sony_nc_acpi_device, 1, event);
}
@@ -472,9 +474,8 @@ static int sony_nc_add(struct acpi_devic
if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle,
*item->acpiget,
&handle))) {
- if (debug)
- printk(LOG_PFX "Found %s getter: %s\n",
- item->name, *item->acpiget);
+ dprintk("Found %s getter: %s\n",
+ item->name, *item->acpiget);
item->devattr.attr.mode |= S_IRUGO;
break;
}
@@ -485,9 +486,8 @@ static int sony_nc_add(struct acpi_devic
if (ACPI_SUCCESS(acpi_get_handle(sony_nc_acpi_handle,
*item->acpiset,
&handle))) {
- if (debug)
- printk(LOG_PFX "Found %s setter: %s\n",
- item->name, *item->acpiset);
+ dprintk("Found %s setter: %s\n",
+ item->name, *item->acpiset);
item->devattr.attr.mode |= S_IWUSR;
break;
}
--
--
mattia
:wq!
next prev parent reply other threads:[~2007-04-09 17:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070409081903.057292676@linux.it>
2007-04-09 17:18 ` [patch 1/9] Remove ACPI references from variable and function names malattia
2007-04-09 17:20 ` [patch 2/9] Prepare the platform driver for multiple users malattia
2007-04-09 17:22 ` malattia [this message]
2007-04-09 17:26 ` [patch 4/9] Add SNY6001 device handling (sonypi reimplementation) malattia
2007-04-09 17:28 ` [patch 5/9] Unify the input subsystem event forwarding malattia
2007-04-09 17:28 ` [patch 6/9] additional platform attributes coming from SNY6001 malattia
2007-04-09 17:31 ` [patch 7/9] sanitize printks malattia
2007-04-09 17:31 ` [patch 8/9] update documentation and Kconfig help malattia
2007-04-09 17:31 ` [patch 9/9] sonypi backward compatibility code malattia
2007-04-10 20:13 ` [patch 0/9] [RFC] sonypi ACPI reimplementation (resend 3) Len Brown
2007-04-10 22:04 ` Mattia Dongili
2007-04-12 9:20 ` Stelian Pop
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070409172244.GD10646@inferi.kami.home \
--to=malattia@linux.it \
--cc=akpm@linux-foundation.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=stelian@popies.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox