static int devfreq_frequency_scaler(int dm_type, void *devdata,
u32 target_freq, unsigned int relation)
{
- struct device *dev;
struct devfreq *devfreq;
unsigned long freq = target_freq;
u32 flags = 0;
int err = 0;
- dev = find_exynos_devfreq_device(devdata);
- if (IS_ERR(dev)) {
- pr_err("%s: No such devfreq device for dm_type(%d)\n", __func__, dm_type);
- err = -ENODEV;
- goto err_out;
- }
-
- mutex_lock(&devfreq_list_lock);
- devfreq = find_device_devfreq(dev);
- mutex_unlock(&devfreq_list_lock);
- if (IS_ERR(devfreq)) {
- dev_err(dev, "%s: No such devfreq for the device\n", __func__);
+ devfreq = find_exynos_devfreq_device(devdata);
+ if (IS_ERR_OR_NULL(devfreq)) {
+ pr_err("%s: No such devfreq for dm_type(%d)\n", __func__, dm_type);
err = -ENODEV;
goto err_out;
}
#if defined(CONFIG_ARM_EXYNOS_DEVFREQ) && defined(CONFIG_EXYNOS_DVFS_MANAGER)
u32 exynos_devfreq_get_dm_type(u32 devfreq_type);
u32 exynos_devfreq_get_devfreq_type(int dm_type);
-struct device *find_exynos_devfreq_device(void *devdata);
+struct devfreq *find_exynos_devfreq_device(void *devdata);
int find_exynos_devfreq_dm_type(struct device *dev, int *dm_type);
#endif
#endif /* __EXYNOS_DEVFREQ_H_ */