toshiba_haps: Small updates to driver code
Subsystems (3)
Azael Avalos
maintainercover toshiba_haps: Small updates to driver code
These two patches make some small changes to the driver code, the first splits the error check fro the ACPI status and the HDD protection, and the second simply changes the printing level of two strings from info to debug.
Azael Avalos (2):
toshiba_haps: Split ACPI status error check from HDD protection
support
toshiba_haps: Change the error logging level from info to debug
drivers/platform/x86/toshiba_haps.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
Signature · 1 line
2.9.3
Azael Avalos
maintainerPATCH 1/2 toshiba_haps: Split ACPI status error check from HDD protection support
Currently the code checking for the ACPI status is mixed along with the actual HDD protection status check.
This patch splits those two checks are they are not related, printing an error string in case the ACPI call failed, and then check for actual HDD protection status.
--- drivers/platform/x86/toshiba_haps.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/platform/x86/toshiba_haps.c +7 -3
@@ -168,9 +168,13 @@ static int toshiba_haps_available(acpi_handle handle)* A non existent device as well as having (only) * Solid State Drives can cause the call to fail. */ - status =acpi_evaluate_integer (handle,"_STA" ,NULL , - &hdd_present); -if (ACPI_FAILURE (status) || !hdd_present) { + status =acpi_evaluate_integer (handle,"_STA" ,NULL , &hdd_present); +if (ACPI_FAILURE (status)) { +pr_err ("ACPI call to query HDD protection failed\n" ); +return 0 ; + } + +if (!hdd_present) {pr_info ("HDD protection not available or using SSD\n" );return 0 ; }
Signature · 1 line
2.9.3
Azael Avalos
maintainerPATCH 2/2 toshiba_haps: Change the error logging level from info to debug
In reply to Azael AvalosTwo of the internal functions are printing an info message, one whenever the HDD protection level changes, and another when the driver receives an ACPI event.
This patch changes those two prints to debug, as that information is more pertaining to debuging purposes.
--- drivers/platform/x86/toshiba_haps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/toshiba_haps.c +2 -2
@@ -59,7 +59,7 @@ static int toshiba_haps_protection_level(acpi_handle handle, int level)return -EIO ; } -pr_info ("HDD protection level set to: %d\n" , level); +pr_debug ("HDD protection level set to: %d\n" , level);return 0 ; }
@@ -141,7 +141,7 @@ static struct attribute_group haps_attr_group = {*/ static void toshiba_haps_notify (struct acpi_device *device,u32 event) { -pr_info ("Received event: 0x%x" , event); +pr_debug ("Received event: 0x%x" , event); acpi_bus_generate_netlink_event(device->pnp.device_class, dev_name(&device->dev),
Signature · 1 line
2.9.3
Azael Avalos
maintainerPATCH 1/1 toshiba_bluetooth: Decouple an error checking status code
In reply to Azael AvalosThis patch simply decouples te error checking of the ACPI status and the actual BT status, as those two were nested in an if/else check, but are completely unrelated.
--- drivers/platform/x86/toshiba_bluetooth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/platform/x86/toshiba_bluetooth.c +3 -1
@@ -80,7 +80,9 @@ static int toshiba_bluetooth_present(acpi_handle handle)if (ACPI_FAILURE (result)) {pr_err ("ACPI call to query Bluetooth presence failed\n" );return -ENXIO ; - }else if (!bt_present) { + } + +if (!bt_present) {pr_info ("Bluetooth device not present\n" );return -ENODEV ; }
Signature · 1 line
2.9.3
Darren Hart
AppliedRe: [PATCH] toshiba_bluetooth: Decouple an error checking status code
Quoted 5 lines · Azael Avalos
This patch simply decouples te error checking of the ACPI status and the actual BT status, as those two were nested in an if/else check, but are completely unrelated.
Signed-off-by Azael Avalos <[email protected]>
Queued, thanks.
Signature · 2 lines
Darren Hart Intel Open Source Technology Center
Darren Hart
AppliedQuoted 4 lines · Azael Avalos
These two patches make some small changes to the driver code, the first splits the error check fro the ACPI status and the HDD protection, and the second simply changes the printing level of two strings from info to debug.
Queued, thanks Azael.
After reviewing the history of this tree and following the approach of the ACPI tree, I've started prefixing commit subjects with "platform/x86: DRIVERNAME:
MESSAGE". Please use this format in the future (not a big deal, but it's nice when your subject is the same as the one I submit).
Thanks (and sorry for the delay).
Quoted 13 lines
Azael Avalos (2):
toshiba_haps: Split ACPI status error check from HDD protection
support
toshiba_haps: Change the error logging level from info to debugdrivers/platform/x86/toshiba_haps.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)Signature · 1 line
2.9.3
Signature · 2 lines
Darren Hart Intel Open Source Technology Center