]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
drm/nouveau/disp,pm: constify nvkm_object_func structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 11 Oct 2015 12:18:09 +0000 (14:18 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 3 Nov 2015 05:02:18 +0000 (15:02 +1000)
These nvkm_object_func structures are never modified.  All other
nvkm_object_func structures are declared as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv04.c
drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c

index 62d3fb66d0ec23a8606e6af0267f2fa6d215d012..2be846374d39aaf694fd8fd630bfe4b3e9c7f855 100644 (file)
@@ -109,7 +109,7 @@ nv04_disp_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size)
        return -EINVAL;
 }
 
-static struct nvkm_object_func
+static const struct nvkm_object_func
 nv04_disp_root = {
        .mthd = nv04_disp_mthd,
        .ntfy = nvkm_disp_ntfy,
index 0db9be202c42f11944cddf1dadcf5de913b38567..2721592d3031c3da9c4fdc49c2b902a57f542017 100644 (file)
@@ -633,7 +633,7 @@ nvkm_perfmon_dtor(struct nvkm_object *object)
        return perfmon;
 }
 
-static struct nvkm_object_func
+static const struct nvkm_object_func
 nvkm_perfmon = {
        .dtor = nvkm_perfmon_dtor,
        .mthd = nvkm_perfmon_mthd,