/* hibernation_set_ops - set the global hibernate operations @ops: the hibernation operations to use in subsequent hibernation transitions  */
void hibernation_set_ops(struct platform_hibernation_ops *ops)
/* hibernation_set_ops - set the global hibernate operations @ops: the hibernation operations to use in subsequent hibernation transitions  */
void hibernation_set_ops(struct platform_hibernation_ops *ops)
{
	if (ops && !(ops->begin && ops->end &&  ops->pre_snapshot
	    && ops->prepare && ops->finish && ops->enter && ops->pre_restore
	    && ops->restore_cleanup)) {
		WARN_ON(1);
		return;
	}
	mutex_lock(&pm_mutex);
	hibernation_ops = ops;
	if (ops)
		hibernation_mode = HIBERNATION_PLATFORM;
	else if (hibernation_mode == HIBERNATION_PLATFORM)
		hibernation_mode = HIBERNATION_SHUTDOWN;
	mutex_unlock(&pm_mutex);
}