[Nouveau] [PATCH 1/2] pmu/gk20a: add dummy func

Ben Skeggs skeggsb at gmail.com
Thu Sep 3 00:07:23 PDT 2015


On 3 September 2015 at 16:32, Alexandre Courbot <acourbot at nvidia.com> wrote:
> Some parts of the driver expect the PMU to have a func member, so set
> one for GK20A to avoid NULL pointer derefences.
This part should already be done in the current code.

>
> 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
>
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau


More information about the Nouveau mailing list