mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 02:04:19 +08:00
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>
This commit is contained in:
parent
2a92551845
commit
ddde708217
@ -548,6 +548,9 @@ static int __init dell_setup_rfkill(void)
|
||||
buffer->input[0] = 0x2;
|
||||
dell_send_request(buffer, 17, 11);
|
||||
hwswitch_state = buffer->output[1];
|
||||
/* If there is no hwswitch, then clear all hw-controlled bits */
|
||||
if (!(status & BIT(0)))
|
||||
hwswitch_state &= ~7;
|
||||
release_buffer();
|
||||
|
||||
if ((status & (1<<2|1<<8)) == (1<<2|1<<8)) {
|
||||
|
Loading…
Reference in New Issue
Block a user