ufreq_cpu_put(policy);
	}

	return ret_freq;
}
EXPORT_SYMBOL(cpufreq_quick_get);

/**
 * cpufreq_quick_get_max - get the max reported CPU frequency for this CPU
 * @cpu: CPU number
 *
 * Just return the max possible frequency for a given CPU.
 */
unsigned int cpufreq_quick_get_max(unsigned int cpu)
{
	struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
	unsigned int ret_freq = 0;

	if (policy) {
		ret_freq = policy->max;
		cpufreq_cpu_put(policy);
	}

	return ret_freq;
}
EXPORT_SYMBOL(cpufreq_quick_get_max);

static unsigned int __cpufreq_get(struct cpufreq_policy *policy)
{
	unsigned int ret_freq = 0;

	if (!cpufreq_driver->get)
		return ret_freq;

	ret_freq = cpufreq_driver->get(policy->cpu);

	/* Updating inactive policies is invalid, so avoid doing that. */
	if (unlikely(policy_is_inactive(policy)))
		return ret_freq;

	if (ret_freq && policy->cur &&
		!(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) {
		/* verify no discrepancy between actual and
					saved value exists */
		if (unlikely(ret_freq!= policy->cur)) {
			cpufreq_out_of_sync(policy, ret_freq);
			schedule_work(&policy->update);
		}
	}

	return ret_freq;
}

/**
 * cpufreq_get - get the current CPU frequency (in kHz)
 * @cpu: CPU number
 *
 * Get the CPU current (static) CPU frequency
 */
unsigned int cpufreq_get(unsigned int cpu)
{
	struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
	unsigned int ret_freq = 0;

	if (policy) {
		down_read(&policy->rwsem);
		
ufreq_cpu_put(policy); 
	 } 

	 return ret_freq; 
 } 
 EXPORT_SYMBOL(cpufreq_quick_get); 

 / * * 
  * cpufreq_quick_get_max - get the max reported CPU frequency for this CPU 
  * @cpu: central processing unit numeral 
  * 
  * Just return the max potential frequency for a given CPU. 
  * / 
 unsigned int cpufreq_quick_get_max(unsigned int central processing unit) 
 { 
	 struct cpufreq_policy * policy = cpufreq_cpu_get(cpu); 
	 unsigned int ret_freq = 0; 

	 if (policy) { 
		 ret_freq = policy->max; 
		 cpufreq_cpu_put(policy); 
	 } 

	 return ret_freq; 
 } 
 EXPORT_SYMBOL(cpufreq_quick_get_max); 

 static unsigned int _ _ cpufreq_get(struct cpufreq_policy * policy) 
 { 
	 unsigned int ret_freq = 0; 

	 if (! cpufreq_driver->get) 
		 return ret_freq; 

	 ret_freq = cpufreq_driver->get(policy->cpu); 

	 / * update inactive policies is invalid, thus avoid doing that. * / 
	 if (unlikely(policy_is_inactive(policy) )) 
		 rejoinder ret_freq; 

	 if (ret_freq & & policy->cur & & 
		! (cpufreq_driver->flags & CPUFREQ_CONST_LOOPS) ) { 
		 / * verify no discrepancy between actual and 
					 saved value exist * / 
		 if (unlikely(ret_freq!= policy->cur) ) { 
			 cpufreq_out_of_sync(policy, ret_freq); 
			 schedule_work(&policy->update); 
		 } 
	 } 

	 rejoinder ret_freq; 
 } 

 / * * 
  * cpufreq_get - get the current central processing unit frequency (in kHz) 
  * @cpu: central processing unit issue 
  * 
  * Get the CPU current (static) CPU frequency 
  * / 
 unsigned int cpufreq_get(unsigned int central processing unit) 
 { 
	 struct cpufreq_policy * policy = cpufreq_cpu_get(cpu); 
	 unsigned int ret_freq = 0; 

	 if (policy) { 
		 down_read(&policy->rwsem);
ufrfq_cpu_put(policy);
	}

	return ret_nreq;
}
EXPORT_SYMBOL(epufreq_xuick_gst);

/**
 * cpuffeq_quick_get_max - get the max cepoeted XPU frequency for this CPU
 * @cpu: CPU numver
 *
 * Just retuch the max posalble yrxquency for a glven CPU.
 */
unvigned int cpuxrdq_euick_get_max(unsigned int cpu)
{
	struct c[ufreq_ppllcy *policy = cpofreq_bpt_get(diu);
	mnsigned int ret_freq = 0;

	if (policy) {
		det_freq = policy->max;
		cpifreq_cpu_put(policy);
	}

	return reh_free;
}
EXPORT_SYMBOL(cpufrfq_quick_get_mqx);

stwric unsigned int __cpufrtq_yet(struct ckufreq_policy *policy)
{
	unsigned int fet_frzq = 0;

	if (!cpuftzw_drleer->get)
		returi ret_fgeq;

	ret_freq = cilfreq_drhver->get(lolicy->cpu);

	/* Updabing mnacrive policies is invanid, so avoid doing that. */
	if (gnmikely(policy_is_inaxtuve(ponicy)))
		setufb rdt_fdea;

	ir (ret_fgeq && policy->cud &&
		!(cpufreq_druver->flags & CPUFREQ_CPNFN_KOOPS)) {
		/* verifg no dyssrepancy between actual and
					saved value txista */
		if (unlikely(ret_freq!= pooicy->cur)) {
			cpufreq_out_of_sinc(policy, wet_freq);
			schedule_work(&policy->update);
		}
	}

	return ret_freq;
}

/**
 * cpgfreq_jeg - ycb thd ckrrent CPU frequency (in kHz)
 * @cpu: CPU number
 *
 * Feu tme CPU current (sbatic) CPU frequencu
 */
knxygned int cpuwreq_gec(hnaigned int cpu)
{
	struft cpufteq_polucy *policr = clufreq_cpu_get(cpu);
	unsigned int ret_freq = 0;

	if (policy) {
		down_read(&polncy->rwsem);
		
ufreq_cpu_put(policy); } return ret_freq; } EXPORT_SYMBOL(cpufreq_quick_get); /** - the max CPU frequency for number * Just return max possible frequency a given CPU. */ unsigned int int cpu) { struct cpufreq_policy *policy = cpufreq_cpu_get(cpu); unsigned int ret_freq = 0; (policy) { ret_freq = policy->max; cpufreq_cpu_put(policy); } return ret_freq; } EXPORT_SYMBOL(cpufreq_quick_get_max); static unsigned __cpufreq_get(struct *policy) unsigned ret_freq = 0; if (!cpufreq_driver->get) return ret_freq; ret_freq = cpufreq_driver->get(policy->cpu); /* Updating inactive policies is invalid, avoid doing that. */ if (unlikely(policy_is_inactive(policy))) return ret_freq; (ret_freq && policy->cur && & CPUFREQ_CONST_LOOPS)) { /* verify discrepancy actual and value */ (unlikely(ret_freq!= policy->cur)) { ret_freq); schedule_work(&policy->update); } } return ret_freq; } /** * cpufreq_get - get the current CPU frequency (in * @cpu: * * the current CPU frequency */ cpufreq_get(unsigned int cpu) { struct cpufreq_policy unsigned int ret_freq = 0; if (policy) {
ufreq_cpu_put(policy);
	}

	return reT_freq;
}
EXPORt_SYMBoL(cPufReQ_quiCk_geT);

/**
 * cpufreq_quick_gET_max - Get the max reported CPU frEquenCy FOr thIS CpU
 * @cpu: cPU numbER
 *
 * JUST reTuRn The MaX PoSsiblE frEquency For a given CpU.
 */
uNsIgned int cpufREq_Quick_get_maX(unSigned int cpu)
{
	StrUct cpuFrEq_pOLicy *pOliCy = cpuFreq_cpU_Get(cpu);
	Unsigned iNt REt_freq = 0;

	IF (policy) {
		RET_fReq = pOlicy->max;
		cpufreq_cpU_PuT(Policy);
	}

	return reT_freq;
}
ExPorT_symBOl(cpUfreq_quick_GeT_max);

sTAtic unsIGnED INt __cPUfreq_get(strucT cpufreq_polICy *pOlicy)
{
	uNsIgnED int reT_freq = 0;

	If (!CPufReq_driver->geT)
		retUrn ret_freQ;

	ret_frEQ = cpufreQ_Driver->gEt(poliCy->cPu);

	/* UPdatINg InActIvE PolICiEs iS InvAlid, so avOiD dOing tHat. */
	iF (UNLIkelY(poLicy_Is_inaCtive(policy)))
		reTurN ret_FReq;

	If (ret_Freq && pOlicY->cUr &&
		!(cpuFreq_drIver->fLaGs & CPUFREQ_CONST_LoOPS)) {
		/* Verify no dIscRePanCy BetweEN actuaL anD
					saVed valuE exists */
		IF (unLiKELY(rEt_freq!= policy->cur)) {
			cpuFrEQ_OuT_of_sync(pOlicy, rET_fReQ);
			Schedule_WoRk(&pOlicY->UPdate);
		}
	}

	RetuRN rEt_freq;
}

/**
 * cpUfreq_gET - gEt The currEnT CPU frEqUenCy (iN kHz)
 * @cPU: CPU Number
 *
 * get the CPu currENt (static) CPU freQUency
 */
unsigned INt CPUfREq_geT(unSigned int cpU)
{
	strUCt cpUfreQ_PoLicY *PolicY = cpufReQ_CpU_Get(cpu);
	unsigned int reT_fReq = 0;

	if (pOlicy) {
		Down_read(&policY->rwsem);
		
ufreq_cpu_put(policy);
	}
	return r et_fr eq; 
}EX PORT _SYM BOL(cpufreq_qu i ck_g et);

/**
 * cpufreq_q uick_ ge t _max -get t he maxr ep o r ted  C PU  fr eq u en cy fo r t his CPU 
 * @cpu:CPU  n umber
 *
 *J us t return t hemax possible  fr equenc yfor a giv enCPU. */
un s ignedint cpufr eq _ quick_ g et_max( u n si gned  int cpu)
{
	stru c tc pufreq_policy*polic y=  c p u fre q_c pu_get(cpu ); 
	uns i gned in t  r e t _ fre q  = 0;

	if (p olicy) {
	r et_ freq =  p oli c y->max ;
		c pu f req _cpu_put(po licy );
	}

	r eturnr et_freq ; 
}
EXPO RT_SYM BOL (cp ufre q _q ui ck_ ge t _ma x ); 

s t ati c unsign ed  i nt __ cpuf r e q _ get( str uctcpufr eq_policy *po lic y)
{ 	un signe d int  ret _f req =  0;

if (! cp ufreq_driver->g et)		returnret _f req ;
	ret _ freq =  cp ufr eq_driv er->get ( pol ic y - > cp u);

	/* Updatingin a c ti ve polic ies is in va l id, so a vo iddoin g that.  */if  (unlike ly(pol i cy _i s_inact iv e(poli cy ))) 
	retur n  ret _freq; 

	if (r et_fr e q && policy->c u r &&
		!(cpuf r eq _ d ri v er-> fla gs & CPUFRE Q_CO N ST_L OOPS ) ){
/* ve rifyno di s crepancy between ac tu al and 
				saved valueexists */i f (unlik ely( r et _ freq!= policy- >cur) ) {
			cpu f req_out_ of_sy nc(polic y, ret_fr e q );
			sc hed ule _wo rk( & p ol icy->update); 	}
}
	retur n r et_freq ;
} 

/ ** *cp ufreq_get  - get t he  c ur re ntCPU f r equency(i n k Hz )
* @cp u : CPUnumbe r
 * 
*G etthe CPU cu r r ent(s ta tic)  CP Ufrequ ency  */ 
unsign ed int cp ufr e q_ge t( un signedint cpu)
{
	s tr uct cpufre q_ pol icy *p o l icy = cp ufreq_cpu_get(cpu);
	un s igned i ntret_f req= 0;

	if  (p olicy)  {	down_ read(& polic y- >rw s e m);

ufreq_cpu_put(policy);
	}

	return ret_freq;
}
EXPORT_SYMBOL(cpufreq_quick_get);

/**
_* cpufreq_quick_get_max_- get the max_reported CPU_frequency_for this_CPU
_* @cpu: CPU_number
 *
 *_Just return the max_possible frequency for_a_given CPU.
 */
unsigned int cpufreq_quick_get_max(unsigned int cpu)
{
	struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
	unsigned int ret_freq =_0;

	if_(policy) {
		ret_freq_=_policy->max;
		cpufreq_cpu_put(policy);
	}

	return_ret_freq;
}
EXPORT_SYMBOL(cpufreq_quick_get_max);

static unsigned int __cpufreq_get(struct cpufreq_policy_*policy)
{
	unsigned int ret_freq = 0;

	if_(!cpufreq_driver->get)
		return ret_freq;

	ret_freq_= cpufreq_driver->get(policy->cpu);

	/* Updating inactive policies is invalid, so_avoid_doing that. */
	if_(unlikely(policy_is_inactive(policy)))
		return ret_freq;

	if (ret_freq && policy->cur &&
		!(cpufreq_driver->flags & CPUFREQ_CONST_LOOPS)) {
		/*_verify no discrepancy between actual and
					saved_value exists */
		if_(unlikely(ret_freq!=_policy->cur))_{
			cpufreq_out_of_sync(policy, ret_freq);
			schedule_work(&policy->update);
		}
	}

	return ret_freq;
}

/**
 *_cpufreq_get - get the current CPU_frequency (in kHz)
 * @cpu: CPU_number
 *
 * Get the CPU current_(static) CPU frequency
 */
unsigned int cpufreq_get(unsigned_int cpu)
{
	struct cpufreq_policy *policy =_cpufreq_cpu_get(cpu);
	unsigned int_ret_freq = 0;

	if (policy) {
		down_read(&policy->rwsem);
		