From: Mattia Dongili <malattia@linux.it>
To: Matthew Garrett <mjg@redhat.com>
Cc: platform-driver-x86@vger.kernel.org, Mattia Dongili <malattia@linux.it>
Subject: [PATCH 1/8] sony-laptop: add some debug printk useful for bug reports
Date: Sat, 19 Feb 2011 11:52:25 +0900 [thread overview]
Message-ID: <1298083952-22493-2-git-send-email-malattia@linux.it> (raw)
In-Reply-To: <1298083952-22493-1-git-send-email-malattia@linux.it>
Signed-off-by: Mattia Dongili <malattia@linux.it>
---
drivers/platform/x86/sony-laptop.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index 5e83370..3aaa92e 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -733,22 +733,30 @@ static int sony_find_snc_handle(int handle)
for (i = 0x20; i < 0x30; i++) {
acpi_callsetfunc(sony_nc_acpi_handle, "SN00", i, &result);
- if (result == handle)
+ if (result == handle) {
+ dprintk("found handle 0x%.4x (offset: 0x%.2x)\n",
+ handle, i - 0x20);
return i-0x20;
+ }
}
+ dprintk("handle 0x%.4x not found\n", handle);
return -1;
}
static int sony_call_snc_handle(int handle, int argument, int *result)
{
+ int ret = 0;
int offset = sony_find_snc_handle(handle);
if (offset < 0)
return -1;
- return acpi_callsetfunc(sony_nc_acpi_handle, "SN07", offset | argument,
- result);
+ ret = acpi_callsetfunc(sony_nc_acpi_handle, "SN07", offset | argument,
+ result);
+ dprintk("called SN07 with 0x%.4x (result: 0x%.4x)\n", offset | argument,
+ *result);
+ return ret;
}
/*
--
1.7.2.3
next prev parent reply other threads:[~2011-02-19 3:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-19 2:52 [0/8] sony-laptop for 2.6.39 Mattia Dongili
2011-02-19 2:52 ` Mattia Dongili [this message]
2011-02-19 2:52 ` [PATCH 2/8] sony-laptop: documentation updates Mattia Dongili
2011-02-19 2:52 ` [PATCH 3/8] sony-laptop: ignore hard switch rfkill events (SPIC) Mattia Dongili
2011-02-19 3:06 ` Matthew Garrett
2011-02-19 12:46 ` Mattia Dongili
2011-02-19 12:52 ` Thomas Klose
2011-02-19 16:00 ` Matthew Garrett
2011-02-20 3:13 ` Mattia Dongili
2011-02-19 2:52 ` [PATCH 4/8] sony-laptop: use pr_<level> for messages Mattia Dongili
2011-02-19 2:52 ` [PATCH 5/8] sony-laptop: remove unused Type4 define Mattia Dongili
2011-02-19 2:52 ` [PATCH 6/8] sony-laptop: cache handles and report them via sysfs Mattia Dongili
2011-02-19 2:52 ` [PATCH 7/8] sony-laptop: implement keyboard backlight support Mattia Dongili
2011-02-19 2:52 ` [PATCH 8/8] sony-laptop: implement new backlight control method Mattia Dongili
2011-02-21 20:51 ` [0/8] sony-laptop for 2.6.39 Matthew Garrett
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=1298083952-22493-2-git-send-email-malattia@linux.it \
--to=malattia@linux.it \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
/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