* get_idr - function to get a unique id.
* @idr: struct idr * handle used to create a id.
* @id: int * value generated by this function.
+ *
+ * This function will populate @id with an unique
+ * id, using the idr API.
+ *
+ * Return: 0 on success, an error code on failure.
*/
static int get_idr(struct idr *idr, int *id)
{
if (unlikely(ret < 0))
return ret;
*id = ret;
+
return 0;
}
static int is_cpufreq_valid(int cpu)
{
struct cpufreq_policy policy;
+
return !cpufreq_get_policy(&policy, cpu);
}
}
j++;
}
+
return -EINVAL;
}
if (get_property(cpu, (unsigned long)freq, &val, GET_LEVEL))
return THERMAL_CSTATE_INVALID;
+
return (unsigned long)val;
}
EXPORT_SYMBOL_GPL(cpufreq_cooling_get_level);
ret = get_property(cpu, level, &freq, GET_FREQ);
if (ret)
return 0;
+
return freq;
}
struct cpufreq_cooling_device *cpufreq_device = cdev->devdata;
*state = cpufreq_device->cpufreq_state;
+
return 0;
}
cpufreq_dev_count++;
mutex_unlock(&cooling_cpufreq_lock);
+
return cool_dev;
}
EXPORT_SYMBOL_GPL(cpufreq_cooling_register);