summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:06 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:40:06 +1000
commit6d0d40e7a577bbc7497ee7fbfeb2315d46a872a6 (patch)
tree4d12d63abf2bf5dcef568939b76982258b105a43 /drivers/gpu/drm/nouveau/nvkm
parent741d778ea0dde26a345717f1843407760f02fe03 (diff)
downloadtalos-op-linux-6d0d40e7a577bbc7497ee7fbfeb2315d46a872a6.tar.gz
talos-op-linux-6d0d40e7a577bbc7497ee7fbfeb2315d46a872a6.zip
drm/nouveau/device: add direct pointer to struct device
A future commit will hide the platform/pci specifics from nvkm_device, but it's still very useful in a lot of places to have access to the Linux device struct. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/device/base.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
index 2bceecc9c1e0..28ebe06e87b9 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
@@ -764,9 +764,11 @@ nvkm_device_create_(void *dev, enum nv_bus_type type, u64 name,
switch (type) {
case NVKM_BUS_PCI:
device->pdev = dev;
+ device->dev = &device->pdev->dev;
break;
case NVKM_BUS_PLATFORM:
device->platformdev = dev;
+ device->dev = &device->platformdev->dev;
break;
}
device->handle = name;
OpenPOWER on IntegriCloud