toshiba_acpi: Remove TOS_FAILURE check from some functions

This patch removes the check for TOS_FAILURE whenever we are using
the tci_raw function call, as that code is only returned by the
{hci, sci}_{read, write} functions and never by the tci_raw, and
thus making that check irrelevant.

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-05-06 09:35:12 -06:00 committed by Darren Hart
parent 3f75bbe916
commit 8baec45da1
1 changed files with 10 additions and 10 deletions

View File

@ -366,7 +366,7 @@ static int sci_open(struct toshiba_acpi_dev *dev)
acpi_status status; acpi_status status;
status = tci_raw(dev, in, out); status = tci_raw(dev, in, out);
if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { if (ACPI_FAILURE(status)) {
pr_err("ACPI call to open SCI failed\n"); pr_err("ACPI call to open SCI failed\n");
return 0; return 0;
} }
@ -404,7 +404,7 @@ static void sci_close(struct toshiba_acpi_dev *dev)
acpi_status status; acpi_status status;
status = tci_raw(dev, in, out); status = tci_raw(dev, in, out);
if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { if (ACPI_FAILURE(status)) {
pr_err("ACPI call to close SCI failed\n"); pr_err("ACPI call to close SCI failed\n");
return; return;
} }
@ -452,7 +452,7 @@ static int toshiba_illumination_available(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)) {
pr_err("ACPI call to query Illumination support failed\n"); pr_err("ACPI call to query Illumination support failed\n");
return 0; return 0;
} else if (out[0] == TOS_NOT_SUPPORTED) { } else if (out[0] == TOS_NOT_SUPPORTED) {
@ -674,7 +674,7 @@ static int toshiba_eco_mode_available(struct toshiba_acpi_dev *dev)
u32 out[TCI_WORDS]; u32 out[TCI_WORDS];
status = tci_raw(dev, in, out); status = tci_raw(dev, in, out);
if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { if (ACPI_FAILURE(status)) {
pr_err("ACPI call to get ECO led failed\n"); pr_err("ACPI call to get ECO led failed\n");
} else if (out[0] == TOS_NOT_INSTALLED) { } else if (out[0] == TOS_NOT_INSTALLED) {
pr_info("ECO led not installed"); pr_info("ECO led not installed");
@ -796,7 +796,7 @@ static void toshiba_usb_sleep_charge_available(struct toshiba_acpi_dev *dev)
return; return;
status = tci_raw(dev, in, out); status = tci_raw(dev, in, out);
if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { if (ACPI_FAILURE(status)) {
pr_err("ACPI call to get USB Sleep and Charge mode failed\n"); pr_err("ACPI call to get USB Sleep and Charge mode failed\n");
sci_close(dev); sci_close(dev);
return; return;
@ -810,7 +810,7 @@ static void toshiba_usb_sleep_charge_available(struct toshiba_acpi_dev *dev)
in[5] = SCI_USB_CHARGE_BAT_LVL; in[5] = SCI_USB_CHARGE_BAT_LVL;
status = tci_raw(dev, in, out); status = tci_raw(dev, in, out);
if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { if (ACPI_FAILURE(status)) {
pr_err("ACPI call to get USB Sleep and Charge mode failed\n"); pr_err("ACPI call to get USB Sleep and Charge mode failed\n");
sci_close(dev); sci_close(dev);
return; return;
@ -890,7 +890,7 @@ static int toshiba_sleep_functions_status_get(struct toshiba_acpi_dev *dev,
in[5] = SCI_USB_CHARGE_BAT_LVL; in[5] = SCI_USB_CHARGE_BAT_LVL;
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)) {
pr_err("ACPI call to get USB S&C battery level failed\n"); pr_err("ACPI call to get USB S&C battery level failed\n");
return -EIO; return -EIO;
} else if (out[0] == TOS_NOT_SUPPORTED) { } else if (out[0] == TOS_NOT_SUPPORTED) {
@ -919,7 +919,7 @@ static int toshiba_sleep_functions_status_set(struct toshiba_acpi_dev *dev,
in[5] = SCI_USB_CHARGE_BAT_LVL; in[5] = SCI_USB_CHARGE_BAT_LVL;
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)) {
pr_err("ACPI call to set USB S&C battery level failed\n"); pr_err("ACPI call to set USB S&C battery level failed\n");
return -EIO; return -EIO;
} else if (out[0] == TOS_NOT_SUPPORTED) { } else if (out[0] == TOS_NOT_SUPPORTED) {
@ -945,7 +945,7 @@ static int toshiba_usb_rapid_charge_get(struct toshiba_acpi_dev *dev,
in[5] = SCI_USB_CHARGE_RAPID_DSP; in[5] = SCI_USB_CHARGE_RAPID_DSP;
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)) {
pr_err("ACPI call to get USB Rapid Charge 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 ||
@ -973,7 +973,7 @@ static int toshiba_usb_rapid_charge_set(struct toshiba_acpi_dev *dev,
in[5] = SCI_USB_CHARGE_RAPID_DSP; in[5] = SCI_USB_CHARGE_RAPID_DSP;
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)) {
pr_err("ACPI call to set USB Rapid Charge 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) {