[Nouveau] [PATCH 1/2] pmu/gk20a: add dummy func
Alexandre Courbot
acourbot at nvidia.com
Wed Sep 2 23:32:34 PDT 2015
Some parts of the driver expect the PMU to have a func member, so set
one for GK20A to avoid NULL pointer derefences.
Signed-off-by: Alexandre Courbot <acourbot at nvidia.com>
---
drm/nouveau/nvkm/subdev/pmu/gk20a.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drm/nouveau/nvkm/subdev/pmu/gk20a.c b/drm/nouveau/nvkm/subdev/pmu/gk20a.c
index 6689d0290a7e..f46e3310e21a 100644
--- a/drm/nouveau/nvkm/subdev/pmu/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/pmu/gk20a.c
@@ -202,6 +202,10 @@ gk20a_dvfs_data= {
.p_smooth = 1,
};
+static const struct nvkm_pmu_func
+gk20a_pmu_func = {
+};
+
static const struct nvkm_subdev_func
gk20a_pmu = {
.init = gk20a_pmu_init,
@@ -221,6 +225,7 @@ gk20a_pmu_new(struct nvkm_device *device, int index, struct nvkm_pmu **ppmu)
*ppmu = &pmu->base;
nvkm_subdev_ctor(&gk20a_pmu, device, index, 0, &pmu->base.subdev);
+ pmu->base.func = &gk20a_pmu_func;
pmu->data = &gk20a_dvfs_data;
nvkm_alarm_init(&pmu->alarm, gk20a_pmu_dvfs_work);
return 0;
--
2.5.1
More information about the Nouveau
mailing list