Commit 23f45c3a76e715217f40ac397c15815c774cad7f

Authored by Corentin Chary
Committed by Matthew Garrett
1 parent b58baecdde

asus-laptop: fix gps rfkill

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>

Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff

drivers/platform/x86/asus-laptop.c
... ... @@ -1066,9 +1066,9 @@
1066 1066 */
1067 1067 static int asus_gps_rfkill_set(void *data, bool blocked)
1068 1068 {
1069   - acpi_handle handle = data;
  1069 + struct asus_laptop *asus = data;
1070 1070  
1071   - return asus_gps_switch(handle, !blocked);
  1071 + return asus_gps_switch(asus, !blocked);
1072 1072 }
1073 1073  
1074 1074 static const struct rfkill_ops asus_gps_rfkill_ops = {
... ... @@ -1095,7 +1095,7 @@
1095 1095  
1096 1096 asus->gps_rfkill = rfkill_alloc("asus-gps", &asus->platform_device->dev,
1097 1097 RFKILL_TYPE_GPS,
1098   - &asus_gps_rfkill_ops, NULL);
  1098 + &asus_gps_rfkill_ops, asus);
1099 1099 if (!asus->gps_rfkill)
1100 1100 return -EINVAL;
1101 1101