Skip to content

Commit

Permalink
asus-laptop: fix gps rfkill
Browse files Browse the repository at this point in the history
commit 23f45c3 upstream.

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.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
iksaif authored and gregkh committed Nov 22, 2010
1 parent 21a0f6c commit 616ab3c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/platform/x86/asus-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,9 +1064,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 = {
Expand All @@ -1093,7 +1093,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;

Expand Down

0 comments on commit 616ab3c

Please sign in to comment.