From: Ike Panhc <ike.pan@canonical.com>
To: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Matthew Garrett <mjg@redhat.com>
Subject: [PATCH 2/5] ideapad: change parameter of ideapad_sync_rfk_state
Date: Tue, 6 Sep 2011 02:32:01 +0800 [thread overview]
Message-ID: <1315247521-8975-1-git-send-email-ike.pan@canonical.com> (raw)
In-Reply-To: <1315247467-8812-1-git-send-email-ike.pan@canonical.com>
This could save us a local variable.
Signed-off-by: Ike Panhc <ike.pan@canonical.com>
---
drivers/platform/x86/ideapad-laptop.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 0a1ceaa..ab3add3 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -284,9 +284,8 @@ static struct rfkill_ops ideapad_rfk_ops = {
.set_block = ideapad_rfk_set,
};
-static void ideapad_sync_rfk_state(struct acpi_device *adevice)
+static void ideapad_sync_rfk_state(struct ideapad_private *priv)
{
- struct ideapad_private *priv = dev_get_drvdata(&adevice->dev);
unsigned long hw_blocked;
int i;
@@ -577,7 +576,7 @@ static int __devinit ideapad_acpi_add(struct acpi_device *adevice)
else
priv->rfk[i] = NULL;
}
- ideapad_sync_rfk_state(adevice);
+ ideapad_sync_rfk_state(priv);
if (!acpi_video_backlight_support()) {
ret = ideapad_backlight_init(priv);
@@ -630,7 +629,7 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
if (test_bit(vpc_bit, &vpc1)) {
switch (vpc_bit) {
case 9:
- ideapad_sync_rfk_state(adevice);
+ ideapad_sync_rfk_state(priv);
break;
case 4:
ideapad_backlight_notify_brightness(priv);
--
1.7.5.4
next prev parent reply other threads:[~2011-09-05 18:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-05 18:31 [PATCH 0/5] ideapad: patches for v3.2 kernel Ike Panhc
2011-09-05 18:31 ` [PATCH 1/5] ideapad: define vpc commands Ike Panhc
2011-09-05 18:32 ` Ike Panhc [this message]
2011-09-05 18:32 ` [PATCH 3/5] ideapad: add event for Novo key Ike Panhc
2011-09-05 18:32 ` [PATCH 4/5] ideapad: add debugfs support Ike Panhc
2011-09-19 8:38 ` Ike Panhc
2011-09-19 8:50 ` Ike Panhc
2011-09-05 18:33 ` [PATCH 5/5] ideapad: remove sysfs node for cfg Ike Panhc
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=1315247521-8975-1-git-send-email-ike.pan@canonical.com \
--to=ike.pan@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--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