}
}
-static void block_poweroff_cb(const struct device_change_state_info *info, void *udata)
+static void block_poweroff_cb(device_power_state_e prev_state, device_power_state_e next_state,
+ uint64_t wait_callback_id, device_power_transition_reason_e reason, void *udata)
{
static int status = 0;
remove_whole_block_device();
terminate_threads();
- device_power_change_state_wait_done(info->id);
+ device_power_confirm_wait_callback(wait_callback_id);
}
static void booting_done(void)
/* if there is the attached device, try to mount */
block_init_from_udev_enumerate();
- ret_val = device_power_add_change_state_wait_callback(POWER_STATE_POWEROFF | POWER_STATE_REBOOT | POWER_STATE_EXIT,
+ ret_val = device_power_add_state_wait_callback(DEVICE_POWER_STATE_POWEROFF | DEVICE_POWER_STATE_REBOOT | DEVICE_POWER_STATE_EXIT,
block_poweroff_cb, NULL);
if (ret_val < 0)
_E("Failed to call poweroff wait callback.");
udev_exit(NULL);
/* unregister notifier for below each event */
- device_power_remove_change_state_wait_callback(POWER_STATE_POWEROFF | POWER_STATE_REBOOT | POWER_STATE_EXIT);
+ device_power_remove_state_wait_callback(DEVICE_POWER_STATE_POWEROFF | DEVICE_POWER_STATE_REBOOT | DEVICE_POWER_STATE_EXIT);
/* unregister mmc uevent control routine */
ret_val = unregister_udev_uevent_control(&uh);