]>
Commit | Line | Data |
---|---|---|
bb025da9 GKH |
1 | From 23f45c3a76e715217f40ac397c15815c774cad7f Mon Sep 17 00:00:00 2001 |
2 | From: Corentin Chary <corentincj@iksaif.net> | |
3 | Date: Tue, 24 Aug 2010 09:30:46 +0200 | |
4 | Subject: asus-laptop: fix gps rfkill | |
5 | ||
6 | From: Corentin Chary <corentincj@iksaif.net> | |
7 | ||
8 | commit 23f45c3a76e715217f40ac397c15815c774cad7f upstream. | |
9 | ||
10 | The GPS rfkill crappy code. The ops_data argument wasn't | |
11 | set, and was totally misused. The fix have been tested | |
12 | on an Asus R2H. | |
13 | ||
14 | Signed-off-by: Corentin Chary <corentincj@iksaif.net> | |
15 | Signed-off-by: Matthew Garrett <mjg@redhat.com> | |
16 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
17 | ||
18 | --- | |
19 | drivers/platform/x86/asus-laptop.c | 6 +++--- | |
20 | 1 file changed, 3 insertions(+), 3 deletions(-) | |
21 | ||
22 | --- a/drivers/platform/x86/asus-laptop.c | |
23 | +++ b/drivers/platform/x86/asus-laptop.c | |
24 | @@ -1064,9 +1064,9 @@ static ssize_t store_gps(struct device * | |
25 | */ | |
26 | static int asus_gps_rfkill_set(void *data, bool blocked) | |
27 | { | |
28 | - acpi_handle handle = data; | |
29 | + struct asus_laptop *asus = data; | |
30 | ||
31 | - return asus_gps_switch(handle, !blocked); | |
32 | + return asus_gps_switch(asus, !blocked); | |
33 | } | |
34 | ||
35 | static const struct rfkill_ops asus_gps_rfkill_ops = { | |
36 | @@ -1093,7 +1093,7 @@ static int asus_rfkill_init(struct asus_ | |
37 | ||
38 | asus->gps_rfkill = rfkill_alloc("asus-gps", &asus->platform_device->dev, | |
39 | RFKILL_TYPE_GPS, | |
40 | - &asus_gps_rfkill_ops, NULL); | |
41 | + &asus_gps_rfkill_ops, asus); | |
42 | if (!asus->gps_rfkill) | |
43 | return -EINVAL; | |
44 |