Skip to content

Commit

Permalink
Missed some for the string error codes
Browse files Browse the repository at this point in the history
  • Loading branch information
savisitor15 committed May 22, 2019
1 parent a92203c commit ac98011
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions asus_fan.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,8 @@ static int fan_set_max_speed(unsigned long state, bool reset) {
ret = acpi_evaluate_integer(NULL, "\\_SB.ATKD.QMOD", &params, &value);
if (ret != AE_OK) {
err_msg("set_max_speed",
"set max fan speed(s) failed (force reset)! errcode: %d", ret);
"set max fan speed(s) failed (force reset)! errcode: %s",
acpi_format_exception(ret));
return ret;
}

Expand All @@ -637,7 +638,8 @@ static int fan_set_max_speed(unsigned long state, bool reset) {
&value);
if (ret != AE_OK) {
err_msg("set_max_speed",
"set max fan speed(s) failed (no reset) errcoded", ret);
"set max fan speed(s) failed (no reset) errcode: %s",
acpi_format_exception(ret));

return ret;
}
Expand Down Expand Up @@ -680,8 +682,8 @@ static int fan_set_auto() {
if (ret != AE_OK) {
err_msg("set_auto",
"failed reseting fan(s) to auto-mode! "
"errcode: %d - DANGER! OVERHEAT? DANGER!",
ret);
"errcode: %s - DANGER! OVERHEAT? DANGER!",
acpi_format_exception(ret));

return ret;
}
Expand Down Expand Up @@ -737,7 +739,8 @@ static ssize_t temp1_input(struct device *dev, struct device_attribute *attr,
// acpi call
ret = acpi_evaluate_integer(NULL, "\\_SB.PCI0.LPCB.EC0.TH1R", NULL, &value);
if (ret != AE_OK) {
err_msg("read_temp", "failed reading temperature, errcode: %d", ret);
err_msg("read_temp", "failed reading temperature, errcode: %s",
acpi_format_exception(ret));
return ret;
}
size = sprintf((char *)&buf, "%llu\n", value);
Expand Down Expand Up @@ -989,8 +992,8 @@ static int __init fan_init(void) {
// check if reseting fan speeds works
ret = fan_set_max_speed(asus_data.max_fan_speed_default, false);
if (ret != AE_OK) {
err_msg("init", "set max speed to: '%d' failed! errcode: %d",
asus_data.max_fan_speed_default, ret);
err_msg("init", "set max speed to: '%d' failed! errcode: %s",
asus_data.max_fan_speed_default, acpi_format_exception(ret));
return -ENODEV;
}

Expand Down

0 comments on commit ac98011

Please sign in to comment.