drm/nouveau/device: prepare for new-style subdevs
[cascardo/linux.git] / drivers / gpu / drm / nouveau / nouveau_platform.c
index dcfbbfa..c03736b 100644 (file)
@@ -177,7 +177,7 @@ static void nouveau_platform_remove_iommu(struct device *dev,
 static int nouveau_platform_probe(struct platform_device *pdev)
 {
        struct nouveau_platform_gpu *gpu;
-       struct nouveau_platform_device *device;
+       struct nvkm_device *device;
        struct drm_device *drm;
        int err;
 
@@ -214,7 +214,7 @@ static int nouveau_platform_probe(struct platform_device *pdev)
        }
 
        device->gpu = gpu;
-       device->gpu_speedo = tegra_sku_info.gpu_speedo_value;
+       gpu->gpu_speedo = tegra_sku_info.gpu_speedo_value;
 
        err = drm_dev_register(drm, 0);
        if (err < 0)
@@ -237,7 +237,7 @@ static int nouveau_platform_remove(struct platform_device *pdev)
        struct drm_device *drm_dev = platform_get_drvdata(pdev);
        struct nouveau_drm *drm = nouveau_drm(drm_dev);
        struct nvkm_device *device = nvxx_device(&drm->device);
-       struct nouveau_platform_gpu *gpu = nv_device_to_platform(device)->gpu;
+       struct nouveau_platform_gpu *gpu = device->gpu;
        int err;
 
        nouveau_drm_device_remove(drm_dev);
@@ -252,6 +252,7 @@ static int nouveau_platform_remove(struct platform_device *pdev)
 #if IS_ENABLED(CONFIG_OF)
 static const struct of_device_id nouveau_platform_match[] = {
        { .compatible = "nvidia,gk20a" },
+       { .compatible = "nvidia,gm20b" },
        { }
 };