break;
default:
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
- "unsupported transaction %d\n", size));
+ "unsupported transaction %d", size));
return (-1);
}
if ((~temp[0] & ACPI_EC_SMB_STS_DONE)
|| (temp[0] & ACPI_EC_SMB_STS_STATUS)) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
- "transaction %d error\n", size));
+ "transaction %d error", size));
return (-1);
}
break;
default:
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
- "unsupported transaction %d\n", size));
+ "unsupported transaction %d", size));
return (-1);
}
ACPI_SBS_SMBUS_READ, func,
ACPI_SBS_WORD_DATA, &data);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_ec_sbs_access() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_ec_sbs_access() failed"));
} else {
*word = data.word;
}
ACPI_SBS_SMBUS_READ, func,
ACPI_SBS_BLOCK_DATA, &data);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_ec_sbs_access() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_ec_sbs_access() failed"));
} else {
strncpy(str, (const char *)data.block + 1, data.block[0]);
str[data.block[0]] = 0;
ACPI_SBS_SMBUS_WRITE, func,
ACPI_SBS_WORD_DATA, &data);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_ec_sbs_access() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_ec_sbs_access() failed"));
}
return result;
result = acpi_sbs_read_word(battery->sbs,
ACPI_SBSM_SMBUS_ADDR, 0x01, &state);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
}
if (!result) {
is_present = (state & 0x000f) & (1 << battery->id);
result =
acpi_sbs_read_word(sbs, ACPI_SBSM_SMBUS_ADDR, 0x01, &state);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
result =
acpi_sbs_write_word(sbs, ACPI_SBSM_SMBUS_ADDR, 0x01, foo);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_write_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_write_word() failed"));
goto end;
}
}
result = acpi_sbs_read_word(sbs, ACPI_SBSM_SMBUS_ADDR, 0x04,
&battery_system_info);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x03,
&battery_mode);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
battery->info.capacity_mode = (battery_mode & 0x8000) >> 15;
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x10,
&battery->info.full_charge_capacity);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x19,
&battery->info.design_voltage);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x1a,
&specification_info);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
result = acpi_sbs_read_str(sbs, ACPI_SB_SMBUS_ADDR, 0x20,
battery->info.manufacturer_name);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_str() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_str() failed"));
goto end;
}
result = acpi_sbs_read_str(sbs, ACPI_SB_SMBUS_ADDR, 0x21,
battery->info.device_name);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_str() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_str() failed"));
goto end;
}
result = acpi_sbs_read_str(sbs, ACPI_SB_SMBUS_ADDR, 0x22,
battery->info.device_chemistry);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_str() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_str() failed"));
goto end;
}
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x09,
&battery->state.voltage);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x0a,
&battery->state.amperage);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x0f,
&battery->state.remaining_capacity);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x12,
&battery->state.average_time_to_empty);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x13,
&battery->state.average_time_to_full);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x16,
&battery->state.battery_status);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x01,
&battery->alarm.remaining_capacity);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
result = acpi_battery_select(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_select() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_select() failed"));
goto end;
}
acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x03,
&battery_mode);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
acpi_sbs_write_word(sbs, ACPI_SB_SMBUS_ADDR, 0x01,
battery_mode & 0xbfff);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_write_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_write_word() failed"));
goto end;
}
}
foo = alarm / (battery->info.capacity_mode ? 10 : 1);
result = acpi_sbs_write_word(sbs, ACPI_SB_SMBUS_ADDR, 0x01, foo);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_write_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_write_word() failed"));
goto end;
}
result = acpi_sbs_read_word(battery->sbs,
ACPI_SB_SMBUS_ADDR, 0x03, &battery_mode);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
result = acpi_sbs_write_word(battery->sbs,
ACPI_SB_SMBUS_ADDR, 0x03, battery_mode);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_write_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_write_word() failed"));
goto end;
}
result = acpi_sbs_read_word(battery->sbs,
ACPI_SB_SMBUS_ADDR, 0x03, &battery_mode);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
result = acpi_battery_select(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_init() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_init() failed"));
goto end;
}
result = acpi_battery_set_mode(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_set_mode() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_set_mode() failed"));
goto end;
}
result = acpi_battery_get_info(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_get_info() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_get_info() failed"));
goto end;
}
result = acpi_battery_get_state(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_get_state() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_get_state() failed"));
goto end;
}
result = acpi_battery_get_alarm(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_get_alarm() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_get_alarm() failed"));
goto end;
}
&charger_status);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_read_word() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
if (!*dir) {
*dir = proc_mkdir(dir_name, parent_dir);
if (!*dir) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "proc_mkdir() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "proc_mkdir() failed"));
return -ENODEV;
}
(*dir)->owner = THIS_MODULE;
if (info_fops) {
entry = create_proc_entry(ACPI_SBS_FILE_INFO, S_IRUGO, *dir);
if (!entry) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "create_proc_entry() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "create_proc_entry() failed"));
} else {
entry->proc_fops = info_fops;
entry->data = data;
if (state_fops) {
entry = create_proc_entry(ACPI_SBS_FILE_STATE, S_IRUGO, *dir);
if (!entry) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "create_proc_entry() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "create_proc_entry() failed"));
} else {
entry->proc_fops = state_fops;
entry->data = data;
if (alarm_fops) {
entry = create_proc_entry(ACPI_SBS_FILE_ALARM, S_IRUGO, *dir);
if (!entry) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "create_proc_entry() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "create_proc_entry() failed"));
} else {
entry->proc_fops = alarm_fops;
entry->data = data;
if (update_mode == REQUEST_UPDATE_MODE) {
result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_INFO);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_update_run() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_update_run() failed"));
}
}
if (update_mode == REQUEST_UPDATE_MODE) {
result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_STATE);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_update_run() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_update_run() failed"));
}
}
if (update_mode == REQUEST_UPDATE_MODE) {
result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_ALARM);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_update_run() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_update_run() failed"));
}
}
result = acpi_battery_set_alarm(battery, new_alarm);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_set_alarm() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_set_alarm() failed"));
acpi_battery_set_alarm(battery, old_alarm);
goto end;
}
result = acpi_battery_get_alarm(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_get_alarm() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_get_alarm() failed"));
acpi_battery_set_alarm(battery, old_alarm);
goto end;
}
if (update_mode == REQUEST_UPDATE_MODE) {
result = acpi_sbs_update_run(sbs, DATA_TYPE_AC_STATE);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_update_run() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_update_run() failed"));
}
}
result = acpi_battery_select(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_select() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_select() failed"));
goto end;
}
result = acpi_battery_get_present(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_get_present() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_get_present() failed"));
goto end;
}
if (is_present) {
result = acpi_battery_init(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_init() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_init() failed"));
goto end;
}
battery->init_state = 1;
&acpi_battery_state_fops,
&acpi_battery_alarm_fops, battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_generic_add_fs() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_generic_add_fs() failed"));
goto end;
}
battery->alive = 1;
result = acpi_ac_get_present(sbs);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_ac_get_present() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_ac_get_present() failed"));
goto end;
}
ACPI_AC_DIR_NAME,
NULL, &acpi_ac_state_fops, NULL, sbs);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_generic_add_fs() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_generic_add_fs() failed"));
goto end;
}
result = acpi_ac_get_present(sbs);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_ac_get_present() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_ac_get_present() failed"));
}
new_ac_present = acpi_ac_is_present(sbs);
result = acpi_battery_select(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_select() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_select() failed"));
}
if (sbs->zombie) {
goto end;
result = acpi_battery_get_present(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_get_present() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_get_present() failed"));
}
if (sbs->zombie) {
goto end;
}
result = acpi_battery_init(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_init() "
- "failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_init() "
+ "failed"));
}
}
if (data_type == DATA_TYPE_INFO) {
if (new_battery_present) {
result = acpi_battery_get_alarm(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_get_alarm() "
- "failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_get_alarm() "
+ "failed"));
}
if (data_type == DATA_TYPE_ALARM) {
continue;
result = acpi_battery_get_state(battery);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_get_state() "
- "failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_get_state() "
+ "failed"));
}
}
if (sbs->zombie) {
dir_name,
ACPI_BATTERY_CLASS);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_generate_event() "
- "failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_generate_event() "
+ "failed"));
}
}
if (old_remaining_capacity != battery->state.remaining_capacity) {
dir_name,
ACPI_BATTERY_CLASS);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_generate_event() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_generate_event() failed"));
}
}
ACPI_AC_DIR_NAME,
ACPI_AC_CLASS);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_generate_event() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_generate_event() failed"));
}
}
result = acpi_sbs_update_run(sbs, DATA_TYPE_COMMON);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbs_update_run() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_update_run() failed"));
}
if (sbs->zombie) {
status =
acpi_evaluate_integer(device->parent->handle, "_EC", NULL, &val);
if (ACPI_FAILURE(status)) {
- ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Error obtaining _EC\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR, "Error obtaining _EC"));
return -EIO;
}
sbs = kzalloc(sizeof(struct acpi_sbs), GFP_KERNEL);
if (!sbs) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "kmalloc() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR, "kmalloc() failed"));
return -ENOMEM;
}
sbs->base = (val & 0xff00ull) >> 8;
result = acpi_ac_add(sbs);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "acpi_ac_add() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR, "acpi_ac_add() failed"));
goto end;
}
result = acpi_evaluate_integer(device->handle, "_SBS", NULL, &sbs_obj);
if (ACPI_FAILURE(result)) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_evaluate_integer() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_evaluate_integer() failed"));
result = -EIO;
goto end;
}
if (sbs_obj > 0) {
result = acpi_sbsm_get_info(sbs);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_sbsm_get_info() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbsm_get_info() failed"));
goto end;
}
sbs->sbsm_present = 1;
if (sbs->sbsm_present == 0) {
result = acpi_battery_add(sbs, 0);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_add() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_add() failed"));
goto end;
}
} else {
if ((sbs->sbsm_batteries_supported & (1 << id))) {
result = acpi_battery_add(sbs, id);
if (result) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_battery_add() "
- "failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_battery_add() "
+ "failed"));
goto end;
}
}
status = acpi_os_execute(OSL_GPE_HANDLER,
acpi_sbs_update_queue, sbs);
if (status != AE_OK) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_os_execute() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_os_execute() failed"));
}
}
sbs->update_time = update_time;
if (capacity_mode != DEF_CAPACITY_UNIT
&& capacity_mode != MAH_CAPACITY_UNIT
&& capacity_mode != MWH_CAPACITY_UNIT) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "acpi_sbs_init: "
- "invalid capacity_mode = %d\n",
- capacity_mode));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR, "acpi_sbs_init: "
+ "invalid capacity_mode = %d", capacity_mode));
return -EINVAL;
}
acpi_ac_dir = acpi_lock_ac_dir();
if (!acpi_ac_dir) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_lock_ac_dir() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_lock_ac_dir() failed"));
return -ENODEV;
}
acpi_battery_dir = acpi_lock_battery_dir();
if (!acpi_battery_dir) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_lock_battery_dir() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_lock_battery_dir() failed"));
return -ENODEV;
}
result = acpi_bus_register_driver(&acpi_sbs_driver);
if (result < 0) {
- ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
- "acpi_bus_register_driver() failed\n"));
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_bus_register_driver() failed"));
return -ENODEV;
}