From 9ef87cddd78de6b8c7b549ae180189a0d17b5c31 Mon Sep 17 00:00:00 2001 From: Corentin Chary Date: Fri, 1 Jul 2011 11:34:41 +0200 Subject: [PATCH] --- yaml --- r: 262610 b: refs/heads/master c: a912d329102aa13c572989c6adc103685c9d24ae h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/platform/x86/asus-wmi.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2d30afdfbb1d..0ac94761e884 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 43be8bde1fdfbe3f4dedfd04ca4f9d6dd1e04b46 +refs/heads/master: a912d329102aa13c572989c6adc103685c9d24ae diff --git a/trunk/drivers/platform/x86/asus-wmi.c b/trunk/drivers/platform/x86/asus-wmi.c index 57514deb8e2b..95cba9ebf6c0 100644 --- a/trunk/drivers/platform/x86/asus-wmi.c +++ b/trunk/drivers/platform/x86/asus-wmi.c @@ -195,6 +195,7 @@ struct asus_wmi { struct asus_rfkill wimax; struct asus_rfkill wwan3g; struct asus_rfkill gps; + struct asus_rfkill uwb; struct hotplug_slot *hotplug_slot; struct mutex hotplug_lock; @@ -841,6 +842,11 @@ static void asus_wmi_rfkill_exit(struct asus_wmi *asus) rfkill_destroy(asus->gps.rfkill); asus->gps.rfkill = NULL; } + if (asus->uwb.rfkill) { + rfkill_unregister(asus->uwb.rfkill); + rfkill_destroy(asus->uwb.rfkill); + asus->uwb.rfkill = NULL; + } } static int asus_wmi_rfkill_init(struct asus_wmi *asus) @@ -881,6 +887,12 @@ static int asus_wmi_rfkill_init(struct asus_wmi *asus) if (result && result != -ENODEV) goto exit; + result = asus_new_rfkill(asus, &asus->uwb, "asus-uwb", + RFKILL_TYPE_UWB, ASUS_WMI_DEVID_UWB); + + if (result && result != -ENODEV) + goto exit; + if (!asus->driver->hotplug_wireless) goto exit; @@ -1737,6 +1749,10 @@ static int asus_hotk_restore(struct device *device) bl = !asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_GPS); rfkill_set_sw_state(asus->gps.rfkill, bl); } + if (asus->uwb.rfkill) { + bl = !asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_UWB); + rfkill_set_sw_state(asus->uwb.rfkill, bl); + } return 0; }