Loading drivers/regulator/core.c +11 −8 Original line number Diff line number Diff line Loading @@ -2152,6 +2152,14 @@ static void regulator_disable_work(struct work_struct *work) count = rdev->deferred_disables; rdev->deferred_disables = 0; /* * Workqueue functions queue the new work instance while the previous * work instance is being processed. Cancel the queued work instance * as the work instance under processing does the job of the queued * work instance. */ cancel_delayed_work(&rdev->disable_work); for (i = 0; i < count; i++) { ret = _regulator_disable(rdev); if (ret != 0) Loading Loading @@ -2186,7 +2194,6 @@ static void regulator_disable_work(struct work_struct *work) int regulator_disable_deferred(struct regulator *regulator, int ms) { struct regulator_dev *rdev = regulator->rdev; int ret; if (regulator->always_on) return 0; Loading @@ -2196,14 +2203,10 @@ int regulator_disable_deferred(struct regulator *regulator, int ms) mutex_lock(&rdev->mutex); rdev->deferred_disables++; mod_delayed_work(system_power_efficient_wq, &rdev->disable_work, msecs_to_jiffies(ms)); mutex_unlock(&rdev->mutex); ret = queue_delayed_work(system_power_efficient_wq, &rdev->disable_work, msecs_to_jiffies(ms)); if (ret < 0) return ret; else return 0; } EXPORT_SYMBOL_GPL(regulator_disable_deferred); Loading Loading
drivers/regulator/core.c +11 −8 Original line number Diff line number Diff line Loading @@ -2152,6 +2152,14 @@ static void regulator_disable_work(struct work_struct *work) count = rdev->deferred_disables; rdev->deferred_disables = 0; /* * Workqueue functions queue the new work instance while the previous * work instance is being processed. Cancel the queued work instance * as the work instance under processing does the job of the queued * work instance. */ cancel_delayed_work(&rdev->disable_work); for (i = 0; i < count; i++) { ret = _regulator_disable(rdev); if (ret != 0) Loading Loading @@ -2186,7 +2194,6 @@ static void regulator_disable_work(struct work_struct *work) int regulator_disable_deferred(struct regulator *regulator, int ms) { struct regulator_dev *rdev = regulator->rdev; int ret; if (regulator->always_on) return 0; Loading @@ -2196,14 +2203,10 @@ int regulator_disable_deferred(struct regulator *regulator, int ms) mutex_lock(&rdev->mutex); rdev->deferred_disables++; mod_delayed_work(system_power_efficient_wq, &rdev->disable_work, msecs_to_jiffies(ms)); mutex_unlock(&rdev->mutex); ret = queue_delayed_work(system_power_efficient_wq, &rdev->disable_work, msecs_to_jiffies(ms)); if (ret < 0) return ret; else return 0; } EXPORT_SYMBOL_GPL(regulator_disable_deferred); Loading