]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/2.6.35.9/asus-laptop-fix-gps-rfkill.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 2.6.35.9 / asus-laptop-fix-gps-rfkill.patch
CommitLineData
bb025da9
GKH
1From 23f45c3a76e715217f40ac397c15815c774cad7f Mon Sep 17 00:00:00 2001
2From: Corentin Chary <corentincj@iksaif.net>
3Date: Tue, 24 Aug 2010 09:30:46 +0200
4Subject: asus-laptop: fix gps rfkill
5
6From: Corentin Chary <corentincj@iksaif.net>
7
8commit 23f45c3a76e715217f40ac397c15815c774cad7f upstream.
9
10The GPS rfkill crappy code. The ops_data argument wasn't
11set, and was totally misused. The fix have been tested
12on an Asus R2H.
13
14Signed-off-by: Corentin Chary <corentincj@iksaif.net>
15Signed-off-by: Matthew Garrett <mjg@redhat.com>
16Signed-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