From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752795AbbC3B0F (ORCPT ); Sun, 29 Mar 2015 21:26:05 -0400 Received: from mail-oi0-f44.google.com ([209.85.218.44]:36226 "EHLO mail-oi0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752723AbbC3BZu (ORCPT ); Sun, 29 Mar 2015 21:25:50 -0400 From: Azael Avalos To: Darren Hart , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Azael Avalos Subject: [PATCH v2 2/3] toshiba_acpi: Fix pr_* messages from USB Sleep Functions Date: Sun, 29 Mar 2015 19:25:40 -0600 Message-Id: <1427678740-5459-3-git-send-email-coproscefalo@gmail.com> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1427678740-5459-1-git-send-email-coproscefalo@gmail.com> References: <1427678740-5459-1-git-send-email-coproscefalo@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/platform/x86/toshiba_acpi.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index c8ad61c..be755606 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -963,11 +963,11 @@ static int toshiba_usb_rapid_charge_get(struct toshiba_acpi_dev *dev, status = tci_raw(dev, in, out); sci_close(dev); 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; } else if (out[0] == TOS_NOT_SUPPORTED || 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; } @@ -991,10 +991,10 @@ static int toshiba_usb_rapid_charge_set(struct toshiba_acpi_dev *dev, status = tci_raw(dev, in, out); sci_close(dev); 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; } 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; } else if (out[0] == TOS_INPUT_DATA_ERROR) { return -EIO; @@ -1013,10 +1013,10 @@ static int toshiba_usb_sleep_music_get(struct toshiba_acpi_dev *dev, u32 *state) result = sci_read(dev, SCI_USB_SLEEP_MUSIC, state); sci_close(dev); 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; } 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; } else if (result == TOS_INPUT_DATA_ERROR) { return -EIO; @@ -1035,10 +1035,10 @@ static int toshiba_usb_sleep_music_set(struct toshiba_acpi_dev *dev, u32 state) result = sci_write(dev, SCI_USB_SLEEP_MUSIC, state); sci_close(dev); 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; } 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; } else if (result == TOS_INPUT_DATA_ERROR) { return -EIO; -- 2.2.2