diff options
| author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2009-12-15 18:51:07 -0500 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2009-12-15 23:57:09 -0500 |
| commit | 5451a923bbdcff6ae665947e120af7238b21a9d2 (patch) | |
| tree | 42be9a678b73910c2d69cd91ca0b9bce9ccc3643 | |
| parent | d89a727aff649f6768f7a34ee57f031ebf8bab4c (diff) | |
thinkpad-acpi: log initial state of rfkill switches
We already log the initial state of the hardware rfkill switch (WLSW),
might as well log the state of the softswitches as well.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Josip Rodin <joy+kernel@entuzijast.net>
Signed-off-by: Len Brown <len.brown@intel.com>
| -rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 7 |
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 | ||
