sepArate
On 18/04/16 22:14, Karol Herbst wrote:
Would be nice to say what for.
With a better commit message and the typo fixed:
Reviewed-by: Martin Peres <martin.pe...@free.fr>
Signed-off-by: Karol Herbst <nouv...@karolherbst.de>
---
drm/nouveau/nvkm/subdev/clk/base.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drm/nouveau/nvkm/subdev/clk/base.c
b/drm/nouveau/nvkm/subdev/clk/base.c
index 7f86e41..d6f239f 100644
--- a/drm/nouveau/nvkm/subdev/clk/base.c
+++ b/drm/nouveau/nvkm/subdev/clk/base.c
@@ -319,14 +319,11 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstateid)
}
static void
-nvkm_clk_update_work(struct work_struct *work)
+nvkm_clk_update_impl(struct nvkm_clk *clk)
{
- struct nvkm_clk *clk = container_of(work, typeof(*clk), work);
struct nvkm_subdev *subdev = &clk->subdev;
int pstate, ret;
- if (!atomic_xchg(&clk->waiting, 0))
- return;
clk->pwrsrc = power_supply_is_system_supplied();
if (clk->pstate)
@@ -350,6 +347,17 @@ nvkm_clk_update_work(struct work_struct *work)
nvkm_error(subdev, "error setting pstate %d: %d\n",
pstate, ret);
}
+}
+
+static void
+nvkm_clk_update_work(struct work_struct *work)
+{
+ struct nvkm_clk *clk = container_of(work, typeof(*clk), work);
+
+ if (!atomic_xchg(&clk->waiting, 0))
+ return;
+
+ nvkm_clk_update_impl(clk);
wake_up_all(&clk->wait);
nvkm_notify_get(&clk->pwrsrc_ntfy);
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau