aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAzael Avalos <coproscefalo@gmail.com>2015-05-06 11:35:12 -0400
committerDarren Hart <dvhart@linux.intel.com>2015-05-11 13:38:21 -0400
commit8baec45da1181572c0f8dc40c421c3f7ebecb0ab (patch)
treeb54c0fd6712d94817bb7b19560c8c6455ffbef09
parent3f75bbe9162986bc42a553795f703917a8aadf89 (diff)
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>
-rw-r--r--drivers/platform/x86/toshiba_acpi.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 8a9dacc36114..26671923b994 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -366,7 +366,7 @@ static int sci_open(struct toshiba_acpi_dev *dev)
366 acpi_status status; 366 acpi_status status;
367 367
368 status = tci_raw(dev, in, out); 368 status = tci_raw(dev, in, out);
369 if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { 369 if (ACPI_FAILURE(status)) {
370 pr_err("ACPI call to open SCI failed\n"); 370 pr_err("ACPI call to open SCI failed\n");
371 return 0; 371 return 0;
372 } 372 }
@@ -404,7 +404,7 @@ static void sci_close(struct toshiba_acpi_dev *dev)
404 acpi_status status; 404 acpi_status status;
405 405
406 status = tci_raw(dev, in, out); 406 status = tci_raw(dev, in, out);
407 if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { 407 if (ACPI_FAILURE(status)) {
408 pr_err("ACPI call to close SCI failed\n"); 408 pr_err("ACPI call to close SCI failed\n");
409 return; 409 return;
410 } 410 }
@@ -452,7 +452,7 @@ static int toshiba_illumination_available(struct toshiba_acpi_dev *dev)
452 452
453 status = tci_raw(dev, in, out); 453 status = tci_raw(dev, in, out);
454 sci_close(dev); 454 sci_close(dev);
455 if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { 455 if (ACPI_FAILURE(status)) {
456 pr_err("ACPI call to query Illumination support failed\n"); 456 pr_err("ACPI call to query Illumination support failed\n");
457 return 0; 457 return 0;
458 } else if (out[0] == TOS_NOT_SUPPORTED) { 458 } else if (out[0] == TOS_NOT_SUPPORTED) {
@@ -674,7 +674,7 @@ static int toshiba_eco_mode_available(struct toshiba_acpi_dev *dev)
674 u32 out[TCI_WORDS]; 674 u32 out[TCI_WORDS];
675 675
676 status = tci_raw(dev, in, out); 676 status = tci_raw(dev, in, out);
677 if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { 677 if (ACPI_FAILURE(status)) {
678 pr_err("ACPI call to get ECO led failed\n"); 678 pr_err("ACPI call to get ECO led failed\n");
679 } else if (out[0] == TOS_NOT_INSTALLED) { 679 } else if (out[0] == TOS_NOT_INSTALLED) {
680 pr_info("ECO led not installed"); 680 pr_info("ECO led not installed");
@@ -796,7 +796,7 @@ static void toshiba_usb_sleep_charge_available(struct toshiba_acpi_dev *dev)
796 return; 796 return;
797 797
798 status = tci_raw(dev, in, out); 798 status = tci_raw(dev, in, out);
799 if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { 799 if (ACPI_FAILURE(status)) {
800 pr_err("ACPI call to get USB Sleep and Charge mode failed\n"); 800 pr_err("ACPI call to get USB Sleep and Charge mode failed\n");
801 sci_close(dev); 801 sci_close(dev);
802 return; 802 return;
@@ -810,7 +810,7 @@ static void toshiba_usb_sleep_charge_available(struct toshiba_acpi_dev *dev)
810 810
811 in[5] = SCI_USB_CHARGE_BAT_LVL; 811 in[5] = SCI_USB_CHARGE_BAT_LVL;
812 status = tci_raw(dev, in, out); 812 status = tci_raw(dev, in, out);
813 if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { 813 if (ACPI_FAILURE(status)) {
814 pr_err("ACPI call to get USB Sleep and Charge mode failed\n"); 814 pr_err("ACPI call to get USB Sleep and Charge mode failed\n");
815 sci_close(dev); 815 sci_close(dev);
816 return; 816 return;
@@ -890,7 +890,7 @@ static int toshiba_sleep_functions_status_get(struct toshiba_acpi_dev *dev,
890 in[5] = SCI_USB_CHARGE_BAT_LVL; 890 in[5] = SCI_USB_CHARGE_BAT_LVL;
891 status = tci_raw(dev, in, out); 891 status = tci_raw(dev, in, out);
892 sci_close(dev); 892 sci_close(dev);
893 if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { 893 if (ACPI_FAILURE(status)) {
894 pr_err("ACPI call to get USB S&C battery level failed\n"); 894 pr_err("ACPI call to get USB S&C battery level failed\n");
895 return -EIO; 895 return -EIO;
896 } else if (out[0] == TOS_NOT_SUPPORTED) { 896 } else if (out[0] == TOS_NOT_SUPPORTED) {
@@ -919,7 +919,7 @@ static int toshiba_sleep_functions_status_set(struct toshiba_acpi_dev *dev,
919 in[5] = SCI_USB_CHARGE_BAT_LVL; 919 in[5] = SCI_USB_CHARGE_BAT_LVL;
920 status = tci_raw(dev, in, out); 920 status = tci_raw(dev, in, out);
921 sci_close(dev); 921 sci_close(dev);
922 if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { 922 if (ACPI_FAILURE(status)) {
923 pr_err("ACPI call to set USB S&C battery level failed\n"); 923 pr_err("ACPI call to set USB S&C battery level failed\n");
924 return -EIO; 924 return -EIO;
925 } else if (out[0] == TOS_NOT_SUPPORTED) { 925 } else if (out[0] == TOS_NOT_SUPPORTED) {
@@ -945,7 +945,7 @@ static int toshiba_usb_rapid_charge_get(struct toshiba_acpi_dev *dev,
945 in[5] = SCI_USB_CHARGE_RAPID_DSP; 945 in[5] = SCI_USB_CHARGE_RAPID_DSP;
946 status = tci_raw(dev, in, out); 946 status = tci_raw(dev, in, out);
947 sci_close(dev); 947 sci_close(dev);
948 if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { 948 if (ACPI_FAILURE(status)) {
949 pr_err("ACPI call to get USB Rapid Charge failed\n"); 949 pr_err("ACPI call to get USB Rapid Charge failed\n");
950 return -EIO; 950 return -EIO;
951 } else if (out[0] == TOS_NOT_SUPPORTED || 951 } else if (out[0] == TOS_NOT_SUPPORTED ||
@@ -973,7 +973,7 @@ static int toshiba_usb_rapid_charge_set(struct toshiba_acpi_dev *dev,
973 in[5] = SCI_USB_CHARGE_RAPID_DSP; 973 in[5] = SCI_USB_CHARGE_RAPID_DSP;
974 status = tci_raw(dev, in, out); 974 status = tci_raw(dev, in, out);
975 sci_close(dev); 975 sci_close(dev);
976 if (ACPI_FAILURE(status) || out[0] == TOS_FAILURE) { 976 if (ACPI_FAILURE(status)) {
977 pr_err("ACPI call to set USB Rapid Charge failed\n"); 977 pr_err("ACPI call to set USB Rapid Charge failed\n");
978 return -EIO; 978 return -EIO;
979 } else if (out[0] == TOS_NOT_SUPPORTED) { 979 } else if (out[0] == TOS_NOT_SUPPORTED) {