summaryrefslogtreecommitdiff
path: root/nvkm/subdev/pwr
diff options
context:
space:
mode:
authorVince Hsu <vinceh@nvidia.com>2014-12-22 17:11:38 +0800
committerBen Skeggs <bskeggs@redhat.com>2015-01-10 23:57:07 +1000
commit1266b6921dacc4ba4d920f15d88241b407972cc5 (patch)
tree77cfdd8776e33af4b40cee79485cacc49fbe5e9c /nvkm/subdev/pwr
parent870538ee246836647e3b0a09fc2175d41319ac52 (diff)
downloadnouveau-1266b6921dacc4ba4d920f15d88241b407972cc5.tar.gz
pwr: make nouveau_pwr_pgob() non-static
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>
Diffstat (limited to 'nvkm/subdev/pwr')
-rw-r--r--nvkm/subdev/pwr/base.c2
-rw-r--r--nvkm/subdev/pwr/priv.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/nvkm/subdev/pwr/base.c b/nvkm/subdev/pwr/base.c
index 0ab55f27e..1ea433a5e 100644
--- a/nvkm/subdev/pwr/base.c
+++ b/nvkm/subdev/pwr/base.c
@@ -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);
diff --git a/nvkm/subdev/pwr/priv.h b/nvkm/subdev/pwr/priv.h
index 3814a341d..86149d9a4 100644
--- a/nvkm/subdev/pwr/priv.h
+++ b/nvkm/subdev/pwr/priv.h
@@ -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;