summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/pci.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/pci.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c
index 401080ed..50d079bb 100644
--- a/drivers/gpu/nvgpu/common/linux/pci.c
+++ b/drivers/gpu/nvgpu/common/linux/pci.c
@@ -348,20 +348,21 @@ static int nvgpu_pci_init_support(struct pci_dev *pdev)
348{ 348{
349 int err = 0; 349 int err = 0;
350 struct gk20a *g = get_gk20a(&pdev->dev); 350 struct gk20a *g = get_gk20a(&pdev->dev);
351 struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g);
351 352
352 g->regs = ioremap(pci_resource_start(pdev, 0), 353 l->regs = ioremap(pci_resource_start(pdev, 0),
353 pci_resource_len(pdev, 0)); 354 pci_resource_len(pdev, 0));
354 if (IS_ERR(g->regs)) { 355 if (IS_ERR(l->regs)) {
355 nvgpu_err(g, "failed to remap gk20a registers"); 356 nvgpu_err(g, "failed to remap gk20a registers");
356 err = PTR_ERR(g->regs); 357 err = PTR_ERR(l->regs);
357 goto fail; 358 goto fail;
358 } 359 }
359 360
360 g->bar1 = ioremap(pci_resource_start(pdev, 1), 361 l->bar1 = ioremap(pci_resource_start(pdev, 1),
361 pci_resource_len(pdev, 1)); 362 pci_resource_len(pdev, 1));
362 if (IS_ERR(g->bar1)) { 363 if (IS_ERR(l->bar1)) {
363 nvgpu_err(g, "failed to remap gk20a bar1"); 364 nvgpu_err(g, "failed to remap gk20a bar1");
364 err = PTR_ERR(g->bar1); 365 err = PTR_ERR(l->bar1);
365 goto fail; 366 goto fail;
366 } 367 }
367 368