drm/nouveau/clk: Add index field to nvkm_cstate
authorKarol Herbst <karolherbst@gmail.com>
Tue, 12 Jul 2016 19:36:08 +0000 (21:36 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 12 Oct 2016 07:29:22 +0000 (17:29 +1000)
commit761c8f69afdf34c100ccdde1df01163cda4f25e8
tree3ef03a90768f62312950625775cf6c1a372be455
parentfa6c4d8e2c614817c956a4ab59ab8bb24fb3653f
drm/nouveau/clk: Add index field to nvkm_cstate

It is better to read out the id out of the cstate struct directly instead
of iterating over the list of cstates over and over again. Especially when
we start saving pointers to a nvkm_cstate struct, it makes things easier.

v5: Rename field to id.

Signed-off-by: Karol Herbst <karolherbst@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/subdev/clk.h
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c