Loading drivers/devfreq/governor_bw_hwmon.c +6 −0 Original line number Diff line number Diff line Loading @@ -590,9 +590,11 @@ static int gov_start(struct devfreq *df) struct bw_hwmon *hw; struct devfreq_dev_status stat; mutex_lock(&df->lock); node = find_hwmon_node(df); if (!node) { dev_err(dev, "Unable to find HW monitor!\n"); mutex_unlock(&df->lock); return -ENODEV; } hw = node->hw; Loading @@ -617,6 +619,7 @@ static int gov_start(struct devfreq *df) if (ret) goto err_sysfs; mutex_unlock(&df->lock); return 0; err_sysfs: Loading @@ -626,6 +629,7 @@ static int gov_start(struct devfreq *df) node->orig_data = NULL; hw->df = NULL; node->dev_ab = NULL; mutex_unlock(&df->lock); return ret; } Loading @@ -634,6 +638,7 @@ static void gov_stop(struct devfreq *df) struct hwmon_node *node = df->data; struct bw_hwmon *hw = node->hw; mutex_lock(&df->lock); sysfs_remove_group(&df->dev.kobj, node->attr_grp); stop_monitor(df, true); df->data = node->orig_data; Loading @@ -648,6 +653,7 @@ static void gov_stop(struct devfreq *df) if (node->dev_ab) *node->dev_ab = 0; node->dev_ab = NULL; mutex_unlock(&df->lock); } static int gov_suspend(struct devfreq *df) Loading Loading
drivers/devfreq/governor_bw_hwmon.c +6 −0 Original line number Diff line number Diff line Loading @@ -590,9 +590,11 @@ static int gov_start(struct devfreq *df) struct bw_hwmon *hw; struct devfreq_dev_status stat; mutex_lock(&df->lock); node = find_hwmon_node(df); if (!node) { dev_err(dev, "Unable to find HW monitor!\n"); mutex_unlock(&df->lock); return -ENODEV; } hw = node->hw; Loading @@ -617,6 +619,7 @@ static int gov_start(struct devfreq *df) if (ret) goto err_sysfs; mutex_unlock(&df->lock); return 0; err_sysfs: Loading @@ -626,6 +629,7 @@ static int gov_start(struct devfreq *df) node->orig_data = NULL; hw->df = NULL; node->dev_ab = NULL; mutex_unlock(&df->lock); return ret; } Loading @@ -634,6 +638,7 @@ static void gov_stop(struct devfreq *df) struct hwmon_node *node = df->data; struct bw_hwmon *hw = node->hw; mutex_lock(&df->lock); sysfs_remove_group(&df->dev.kobj, node->attr_grp); stop_monitor(df, true); df->data = node->orig_data; Loading @@ -648,6 +653,7 @@ static void gov_stop(struct devfreq *df) if (node->dev_ab) *node->dev_ab = 0; node->dev_ab = NULL; mutex_unlock(&df->lock); } static int gov_suspend(struct devfreq *df) Loading