diff options
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h index a3037f7..d5811a0 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h @@ -9,6 +9,7 @@ struct nvkm_device { struct pci_dev *pdev; struct platform_device *platformdev; + struct device *dev; u64 handle; struct nvkm_event event; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c index 2bceecc..28ebe06 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; |