Merge tag 'mmc-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
[cascardo/linux.git] / drivers / platform / x86 / toshiba_haps.c
index 7f2afc6..b3dec52 100644 (file)
@@ -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),
@@ -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;
        }