aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 3daf349ddc98..05714abf5a87 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -1264,6 +1264,7 @@ static int __init tpacpi_new_rfkill(const enum tpacpi_rfk_id id,
1264 struct tpacpi_rfk *atp_rfk; 1264 struct tpacpi_rfk *atp_rfk;
1265 int res; 1265 int res;
1266 bool sw_state = false; 1266 bool sw_state = false;
1267 bool hw_state;
1267 int sw_status; 1268 int sw_status;
1268 1269
1269 BUG_ON(id >= TPACPI_RFK_SW_MAX || tpacpi_rfkill_switches[id]); 1270 BUG_ON(id >= TPACPI_RFK_SW_MAX || tpacpi_rfkill_switches[id]);
@@ -1298,7 +1299,8 @@ static int __init tpacpi_new_rfkill(const enum tpacpi_rfk_id id,
1298 rfkill_init_sw_state(atp_rfk->rfkill, sw_state); 1299 rfkill_init_sw_state(atp_rfk->rfkill, sw_state);
1299 } 1300 }
1300 } 1301 }
1301 rfkill_set_hw_state(atp_rfk->rfkill, tpacpi_rfk_check_hwblock_state()); 1302 hw_state = tpacpi_rfk_check_hwblock_state();
1303 rfkill_set_hw_state(atp_rfk->rfkill, hw_state);
1302 1304
1303 res = rfkill_register(atp_rfk->rfkill); 1305 res = rfkill_register(atp_rfk->rfkill);
1304 if (res < 0) { 1306 if (res < 0) {
@@ -1311,6 +1313,9 @@ static int __init tpacpi_new_rfkill(const enum tpacpi_rfk_id id,
1311 } 1313 }
1312 1314
1313 tpacpi_rfkill_switches[id] = atp_rfk; 1315 tpacpi_rfkill_switches[id] = atp_rfk;
1316
1317 printk(TPACPI_INFO "rfkill switch %s: radio is %sblocked\n",
1318 name, (sw_state || hw_state) ? "" : "un");
1314 return 0; 1319 return 0;
1315} 1320}
1316 1321