/* This function may sleep, and has the same return conditions as blocking_notifier_chain_unregister.  */
int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list)
/* This function may sleep, and has the same return conditions as blocking_notifier_chain_unregister.  */
int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list)
{
	int ret;
	switch (list) {
	case CPUFREQ_TRANSITION_NOTIFIER:
		ret = srcu_notifier_chain_unregister(
				&cpufreq_transition_notifier_list, nb);
		break;
	case CPUFREQ_POLICY_NOTIFIER:
		ret = blocking_notifier_chain_unregister(
				&cpufreq_policy_notifier_list, nb);
		break;
	default:
		ret = -EINVAL;
	}
	return ret;
}