diff options
Diffstat (limited to 'drivers/platform/x86/dell-laptop.c')
-rw-r--r-- | drivers/platform/x86/dell-laptop.c | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c index d3841de6a8cf..e39ab1d3ed87 100644 --- a/drivers/platform/x86/dell-laptop.c +++ b/drivers/platform/x86/dell-laptop.c | |||
@@ -292,12 +292,9 @@ static int dell_rfkill_set(void *data, bool blocked) | |||
292 | dell_send_request(buffer, 17, 11); | 292 | dell_send_request(buffer, 17, 11); |
293 | 293 | ||
294 | /* If the hardware switch controls this radio, and the hardware | 294 | /* If the hardware switch controls this radio, and the hardware |
295 | switch is disabled, don't allow changing the software state. | 295 | switch is disabled, don't allow changing the software state */ |
296 | If the hardware switch is reported as not supported, always | ||
297 | fire the SMI to toggle the killswitch. */ | ||
298 | if ((hwswitch_state & BIT(hwswitch_bit)) && | 296 | if ((hwswitch_state & BIT(hwswitch_bit)) && |
299 | !(buffer->output[1] & BIT(16)) && | 297 | !(buffer->output[1] & BIT(16))) { |
300 | (buffer->output[1] & BIT(0))) { | ||
301 | ret = -EINVAL; | 298 | ret = -EINVAL; |
302 | goto out; | 299 | goto out; |
303 | } | 300 | } |
@@ -403,23 +400,6 @@ static const struct file_operations dell_debugfs_fops = { | |||
403 | 400 | ||
404 | static void dell_update_rfkill(struct work_struct *ignored) | 401 | static void dell_update_rfkill(struct work_struct *ignored) |
405 | { | 402 | { |
406 | int status; | ||
407 | |||
408 | get_buffer(); | ||
409 | dell_send_request(buffer, 17, 11); | ||
410 | status = buffer->output[1]; | ||
411 | release_buffer(); | ||
412 | |||
413 | /* if hardware rfkill is not supported, set it explicitly */ | ||
414 | if (!(status & BIT(0))) { | ||
415 | if (wifi_rfkill) | ||
416 | dell_rfkill_set((void *)1, !((status & BIT(17)) >> 17)); | ||
417 | if (bluetooth_rfkill) | ||
418 | dell_rfkill_set((void *)2, !((status & BIT(18)) >> 18)); | ||
419 | if (wwan_rfkill) | ||
420 | dell_rfkill_set((void *)3, !((status & BIT(19)) >> 19)); | ||
421 | } | ||
422 | |||
423 | if (wifi_rfkill) | 403 | if (wifi_rfkill) |
424 | dell_rfkill_query(wifi_rfkill, (void *)1); | 404 | dell_rfkill_query(wifi_rfkill, (void *)1); |
425 | if (bluetooth_rfkill) | 405 | if (bluetooth_rfkill) |
@@ -560,11 +540,11 @@ static int dell_get_intensity(struct backlight_device *bd) | |||
560 | else | 540 | else |
561 | dell_send_request(buffer, 0, 1); | 541 | dell_send_request(buffer, 0, 1); |
562 | 542 | ||
543 | ret = buffer->output[1]; | ||
544 | |||
563 | out: | 545 | out: |
564 | release_buffer(); | 546 | release_buffer(); |
565 | if (ret) | 547 | return ret; |
566 | return ret; | ||
567 | return buffer->output[1]; | ||
568 | } | 548 | } |
569 | 549 | ||
570 | static const struct backlight_ops dell_ops = { | 550 | static const struct backlight_ops dell_ops = { |