Skip to content

Commit 923de84

Browse files
ikepanhcMatthew Garrett
authored andcommitted
ideapad: change parameter of ideapad_sync_rfk_state
This could save us a local variable. Signed-off-by: Ike Panhc <ike.pan@canonical.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
1 parent 2be1dc2 commit 923de84

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎drivers/platform/x86/ideapad-laptop.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,8 @@ static struct rfkill_ops ideapad_rfk_ops = {
284284
.set_block = ideapad_rfk_set,
285285
};
286286

287-
static void ideapad_sync_rfk_state(struct acpi_device *adevice)
287+
static void ideapad_sync_rfk_state(struct ideapad_private *priv)
288288
{
289-
struct ideapad_private *priv = dev_get_drvdata(&adevice->dev);
290289
unsigned long hw_blocked;
291290
int i;
292291

@@ -577,7 +576,7 @@ static int __devinit ideapad_acpi_add(struct acpi_device *adevice)
577576
else
578577
priv->rfk[i] = NULL;
579578
}
580-
ideapad_sync_rfk_state(adevice);
579+
ideapad_sync_rfk_state(priv);
581580

582581
if (!acpi_video_backlight_support()) {
583582
ret = ideapad_backlight_init(priv);
@@ -630,7 +629,7 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event)
630629
if (test_bit(vpc_bit, &vpc1)) {
631630
switch (vpc_bit) {
632631
case 9:
633-
ideapad_sync_rfk_state(adevice);
632+
ideapad_sync_rfk_state(priv);
634633
break;
635634
case 4:
636635
ideapad_backlight_notify_brightness(priv);

0 commit comments

Comments
 (0)