Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262609
b: refs/heads/master
c: 43be8bd
h: refs/heads/master
i:
  262607: 8cd5aca
v: v3
  • Loading branch information
Corentin Chary authored and Matthew Garrett committed Aug 5, 2011
1 parent c07e953 commit b5366af
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fddbfed595b307f9dddc7a86ddfbcbcb80141e28
refs/heads/master: 43be8bde1fdfbe3f4dedfd04ca4f9d6dd1e04b46
16 changes: 16 additions & 0 deletions trunk/drivers/platform/x86/asus-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ struct asus_wmi {
struct asus_rfkill bluetooth;
struct asus_rfkill wimax;
struct asus_rfkill wwan3g;
struct asus_rfkill gps;

struct hotplug_slot *hotplug_slot;
struct mutex hotplug_lock;
Expand Down Expand Up @@ -835,6 +836,11 @@ static void asus_wmi_rfkill_exit(struct asus_wmi *asus)
rfkill_destroy(asus->wwan3g.rfkill);
asus->wwan3g.rfkill = NULL;
}
if (asus->gps.rfkill) {
rfkill_unregister(asus->gps.rfkill);
rfkill_destroy(asus->gps.rfkill);
asus->gps.rfkill = NULL;
}
}

static int asus_wmi_rfkill_init(struct asus_wmi *asus)
Expand Down Expand Up @@ -869,6 +875,12 @@ static int asus_wmi_rfkill_init(struct asus_wmi *asus)
if (result && result != -ENODEV)
goto exit;

result = asus_new_rfkill(asus, &asus->gps, "asus-gps",
RFKILL_TYPE_GPS, ASUS_WMI_DEVID_GPS);

if (result && result != -ENODEV)
goto exit;

if (!asus->driver->hotplug_wireless)
goto exit;

Expand Down Expand Up @@ -1721,6 +1733,10 @@ static int asus_hotk_restore(struct device *device)
bl = !asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_WWAN3G);
rfkill_set_sw_state(asus->wwan3g.rfkill, bl);
}
if (asus->gps.rfkill) {
bl = !asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_GPS);
rfkill_set_sw_state(asus->gps.rfkill, bl);
}

return 0;
}
Expand Down

0 comments on commit b5366af

Please sign in to comment.