]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
asus-laptop: fix gps rfkill
authorCorentin Chary <corentincj@iksaif.net>
Tue, 24 Aug 2010 07:30:46 +0000 (09:30 +0200)
committerMatthew Garrett <mjg@redhat.com>
Thu, 21 Oct 2010 13:36:44 +0000 (09:36 -0400)
The GPS rfkill crappy code. The ops_data argument wasn't
set, and was totally misused. The fix have been tested
on an Asus R2H.

Cc: stable@kernel.org
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/asus-laptop.c

index 27298a49c6d33deb184e0615518ad7cd005970a1..67d9228876161f257be85abf9f597bd6a6c55a1c 100644 (file)
@@ -1066,9 +1066,9 @@ static ssize_t store_gps(struct device *dev, struct device_attribute *attr,
  */
 static int asus_gps_rfkill_set(void *data, bool blocked)
 {
-       acpi_handle handle = data;
+       struct asus_laptop *asus = data;
 
-       return asus_gps_switch(handle, !blocked);
+       return asus_gps_switch(asus, !blocked);
 }
 
 static const struct rfkill_ops asus_gps_rfkill_ops = {
@@ -1095,7 +1095,7 @@ static int asus_rfkill_init(struct asus_laptop *asus)
 
        asus->gps_rfkill = rfkill_alloc("asus-gps", &asus->platform_device->dev,
                                        RFKILL_TYPE_GPS,
-                                       &asus_gps_rfkill_ops, NULL);
+                                       &asus_gps_rfkill_ops, asus);
        if (!asus->gps_rfkill)
                return -EINVAL;