toshiba_acpi: Fix pr_* messages from USB Sleep Functions

This patch fixes the messages displayed by the USB Sleep Functions,
they were printing wrong messages not associated to the feature
currently queried.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
This commit is contained in:
Azael Avalos 2015-04-02 19:26:21 -06:00 committed by Darren Hart
parent c8c918425a
commit bb26f1893a
1 changed files with 8 additions and 8 deletions

View File

@ -965,11 +965,11 @@ static int toshiba_usb_rapid_charge_get(struct toshiba_acpi_dev *dev,
status = tci_raw(dev, in, out); status = tci_raw(dev, in, out);
sci_close(dev); sci_close(dev);
if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) {
pr_err("ACPI call to get USB S&C battery level failed\n"); pr_err("ACPI call to get USB Rapid Charge failed\n");
return -EIO; return -EIO;
} else if (out[0] == TOS_NOT_SUPPORTED || } else if (out[0] == TOS_NOT_SUPPORTED ||
out[0] == TOS_INPUT_DATA_ERROR) { out[0] == TOS_INPUT_DATA_ERROR) {
pr_info("USB Sleep and Charge not supported\n"); pr_info("USB Rapid Charge not supported\n");
return -ENODEV; return -ENODEV;
} }
@ -993,10 +993,10 @@ static int toshiba_usb_rapid_charge_set(struct toshiba_acpi_dev *dev,
status = tci_raw(dev, in, out); status = tci_raw(dev, in, out);
sci_close(dev); sci_close(dev);
if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) {
pr_err("ACPI call to set USB S&C battery level failed\n"); pr_err("ACPI call to set USB Rapid Charge failed\n");
return -EIO; return -EIO;
} else if (out[0] == TOS_NOT_SUPPORTED) { } else if (out[0] == TOS_NOT_SUPPORTED) {
pr_info("USB Sleep and Charge not supported\n"); pr_info("USB Rapid Charge not supported\n");
return -ENODEV; return -ENODEV;
} else if (out[0] == TOS_INPUT_DATA_ERROR) { } else if (out[0] == TOS_INPUT_DATA_ERROR) {
return -EIO; return -EIO;
@ -1015,10 +1015,10 @@ static int toshiba_usb_sleep_music_get(struct toshiba_acpi_dev *dev, u32 *state)
result = sci_read(dev, SCI_USB_SLEEP_MUSIC, state); result = sci_read(dev, SCI_USB_SLEEP_MUSIC, state);
sci_close(dev); sci_close(dev);
if (result == TOS_FAILURE) { if (result == TOS_FAILURE) {
pr_err("ACPI call to set USB S&C mode failed\n"); pr_err("ACPI call to get Sleep and Music failed\n");
return -EIO; return -EIO;
} else if (result == TOS_NOT_SUPPORTED) { } else if (result == TOS_NOT_SUPPORTED) {
pr_info("USB Sleep and Charge not supported\n"); pr_info("Sleep and Music not supported\n");
return -ENODEV; return -ENODEV;
} else if (result == TOS_INPUT_DATA_ERROR) { } else if (result == TOS_INPUT_DATA_ERROR) {
return -EIO; return -EIO;
@ -1037,10 +1037,10 @@ static int toshiba_usb_sleep_music_set(struct toshiba_acpi_dev *dev, u32 state)
result = sci_write(dev, SCI_USB_SLEEP_MUSIC, state); result = sci_write(dev, SCI_USB_SLEEP_MUSIC, state);
sci_close(dev); sci_close(dev);
if (result == TOS_FAILURE) { if (result == TOS_FAILURE) {
pr_err("ACPI call to set USB S&C mode failed\n"); pr_err("ACPI call to set Sleep and Music failed\n");
return -EIO; return -EIO;
} else if (result == TOS_NOT_SUPPORTED) { } else if (result == TOS_NOT_SUPPORTED) {
pr_info("USB Sleep and Charge not supported\n"); pr_info("Sleep and Music not supported\n");
return -ENODEV; return -ENODEV;
} else if (result == TOS_INPUT_DATA_ERROR) { } else if (result == TOS_INPUT_DATA_ERROR) {
return -EIO; return -EIO;