aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-11-17 08:00:18 -0500
committerMatthew Garrett <matthew.garrett@nebula.com>2013-11-20 18:50:48 -0500
commitddde708217af6d5fe43c0086247c05ed317076b4 (patch)
treee696fcc1133096c7caccf7ce2718d76a14a6387d
parent2a92551845bbbc8421ba908cd14bbdf065e0f454 (diff)
dell-laptop: If there is no hwswitch, then clear all hw-controlled bits
To ensure we don't enter any hw-switch related code paths on machines without a hw-switch. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
-rw-r--r--drivers/platform/x86/dell-laptop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index bae932b60bab..48fabf6b6ecb 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -548,6 +548,9 @@ static int __init dell_setup_rfkill(void)
548 buffer->input[0] = 0x2; 548 buffer->input[0] = 0x2;
549 dell_send_request(buffer, 17, 11); 549 dell_send_request(buffer, 17, 11);
550 hwswitch_state = buffer->output[1]; 550 hwswitch_state = buffer->output[1];
551 /* If there is no hwswitch, then clear all hw-controlled bits */
552 if (!(status & BIT(0)))
553 hwswitch_state &= ~7;
551 release_buffer(); 554 release_buffer();
552 555
553 if ((status & (1<<2|1<<8)) == (1<<2|1<<8)) { 556 if ((status & (1<<2|1<<8)) == (1<<2|1<<8)) {