summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVince Hsu <vinceh@nvidia.com>2014-12-22 17:11:38 +0800
committerBen Skeggs <bskeggs@redhat.com>2015-01-22 12:15:03 +1000
commit47e7df39d9fb74fa11bd4b4453fc34d231b2169c (patch)
treeb1a6cd444a98de51c47de107d01b5463de9e8c80
parentf8a8546194d7794c309d2d8114f457f4f921afad (diff)
downloadop-kernel-dev-47e7df39d9fb74fa11bd4b4453fc34d231b2169c.zip
op-kernel-dev-47e7df39d9fb74fa11bd4b4453fc34d231b2169c.tar.gz
drm/nouveau/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>
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/pwr/base.c2
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/pwr/priv.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/pwr/base.c b/drivers/gpu/drm/nouveau/core/subdev/pwr/base.c
index 0ab55f2..1ea433a 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/pwr/base.c
+++ b/drivers/gpu/drm/nouveau/core/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/drivers/gpu/drm/nouveau/core/subdev/pwr/priv.h b/drivers/gpu/drm/nouveau/core/subdev/pwr/priv.h
index 3814a34..86149d9 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/pwr/priv.h
+++ b/drivers/gpu/drm/nouveau/core/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;
OpenPOWER on IntegriCloud