drm/nouveau/pwr: make nouveau_pwr_pgob() non-static
authorVince Hsu <vinceh@nvidia.com>
Mon, 22 Dec 2014 09:11:38 +0000 (17:11 +0800)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 22 Jan 2015 02:15:03 +0000 (12:15 +1000)
The platform device does not use the common nouveau_pwr_init() to initialize
the PWR, but it does need the .pgob() be assigned to avoid NULL pointer
dereference in graph/nve4.c.

Signed-off-by: Vince Hsu <vinceh@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/subdev/pwr/base.c
drivers/gpu/drm/nouveau/core/subdev/pwr/priv.h

index 0ab55f2..1ea433a 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "priv.h"
 
-static void
+void
 nouveau_pwr_pgob(struct nouveau_pwr *ppwr, bool enable)
 {
        const struct nvkm_pwr_impl *impl = (void *)nv_oclass(ppwr);
index 3814a34..86149d9 100644 (file)
@@ -26,6 +26,7 @@ int _nouveau_pwr_ctor(struct nouveau_object *, struct nouveau_object *,
 #define _nouveau_pwr_dtor _nouveau_subdev_dtor
 int _nouveau_pwr_init(struct nouveau_object *);
 int _nouveau_pwr_fini(struct nouveau_object *, bool);
+void nouveau_pwr_pgob(struct nouveau_pwr *ppwr, bool enable);
 
 struct nvkm_pwr_impl {
        struct nouveau_oclass base;