mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: Remove Linux devnode fields from gk20a
Move Linux devnode related fields to a new header file os_linux.h. The class structure is defined in module.c, so move its declaration to module.h. JIRA NVGPU-38 Change-Id: I5d8920169064f4289ff61004f7f81543a9aba221 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1505927 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
2ffbdc50d8
commit
92c43deefc
@@ -32,6 +32,8 @@
|
||||
|
||||
#include "pci.h"
|
||||
|
||||
#include "os_linux.h"
|
||||
|
||||
#define PCI_INTERFACE_NAME "card-%s%%s"
|
||||
|
||||
static int nvgpu_pci_tegra_probe(struct device *dev)
|
||||
@@ -346,6 +348,7 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
|
||||
const struct pci_device_id *pent)
|
||||
{
|
||||
struct gk20a_platform *platform = NULL;
|
||||
struct nvgpu_os_linux *l;
|
||||
struct gk20a *g;
|
||||
int err;
|
||||
char nodefmt[64];
|
||||
@@ -359,12 +362,14 @@ static int nvgpu_pci_probe(struct pci_dev *pdev,
|
||||
platform = &nvgpu_pci_device[pent->driver_data];
|
||||
pci_set_drvdata(pdev, platform);
|
||||
|
||||
g = kzalloc(sizeof(struct gk20a), GFP_KERNEL);
|
||||
if (!g) {
|
||||
nvgpu_err(g, "couldn't allocate gk20a support");
|
||||
l = kzalloc(sizeof(*l), GFP_KERNEL);
|
||||
if (!l) {
|
||||
dev_err(&pdev->dev, "couldn't allocate gk20a support");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
g = &l->g;
|
||||
|
||||
nvgpu_kmem_init(g);
|
||||
|
||||
err = nvgpu_init_enabled_flags(g);
|
||||
|
||||
Reference in New Issue
Block a user