diff options
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r-- | drivers/platform/x86/ideapad-laptop.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index e9f7395efc3a..5ff12205aa6b 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c | |||
@@ -52,6 +52,10 @@ static struct { | |||
52 | { "ideapad_killsw", 0, 0, RFKILL_TYPE_WLAN } | 52 | { "ideapad_killsw", 0, 0, RFKILL_TYPE_WLAN } |
53 | }; | 53 | }; |
54 | 54 | ||
55 | static bool no_bt_rfkill; | ||
56 | module_param(no_bt_rfkill, bool, 0444); | ||
57 | MODULE_PARM_DESC(no_bt_rfkill, "No rfkill for bluetooth."); | ||
58 | |||
55 | /* | 59 | /* |
56 | * ACPI Helpers | 60 | * ACPI Helpers |
57 | */ | 61 | */ |
@@ -232,6 +236,14 @@ static int ideapad_register_rfkill(struct acpi_device *adevice, int dev) | |||
232 | int ret; | 236 | int ret; |
233 | unsigned long sw_blocked; | 237 | unsigned long sw_blocked; |
234 | 238 | ||
239 | if (no_bt_rfkill && | ||
240 | (ideapad_rfk_data[dev].type == RFKILL_TYPE_BLUETOOTH)) { | ||
241 | /* Force to enable bluetooth when no_bt_rfkill=1 */ | ||
242 | write_ec_cmd(ideapad_priv->handle, | ||
243 | ideapad_rfk_data[dev].opcode, 1); | ||
244 | return 0; | ||
245 | } | ||
246 | |||
235 | priv->rfk[dev] = rfkill_alloc(ideapad_rfk_data[dev].name, &adevice->dev, | 247 | priv->rfk[dev] = rfkill_alloc(ideapad_rfk_data[dev].name, &adevice->dev, |
236 | ideapad_rfk_data[dev].type, &ideapad_rfk_ops, | 248 | ideapad_rfk_data[dev].type, &ideapad_rfk_ops, |
237 | (void *)(long)dev); | 249 | (void *)(long)dev); |