diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-09-12 13:09:23 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-03 13:13:10 +1000 |
commit | fa6df8c163ddf1fba658059695ab9587f344712c (patch) | |
tree | ede64264bed984ed9dc3c376689ec9b3194ddf97 /drivers/gpu/drm/nouveau/nouveau_drm.c | |
parent | b3ccd34ded3e730bba33cd4bd4b7ab78b4a0bb03 (diff) | |
download | lwn-fa6df8c163ddf1fba658059695ab9587f344712c.tar.gz lwn-fa6df8c163ddf1fba658059695ab9587f344712c.zip |
drm/nouveau/core: have client-id be a string, rather than an integer
Can be somewhat more informative that way...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index e26358c79151..e96507e11488 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -79,7 +79,8 @@ nouveau_name(struct pci_dev *pdev) } static int -nouveau_cli_create(struct pci_dev *pdev, u32 name, int size, void **pcli) +nouveau_cli_create(struct pci_dev *pdev, const char *name, + int size, void **pcli) { struct nouveau_cli *cli; int ret; @@ -246,7 +247,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) struct nouveau_drm *drm; int ret; - ret = nouveau_cli_create(pdev, 0, sizeof(*drm), (void**)&drm); + ret = nouveau_cli_create(pdev, "DRM", sizeof(*drm), (void**)&drm); if (ret) return ret; @@ -496,9 +497,12 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv) struct pci_dev *pdev = dev->pdev; struct nouveau_drm *drm = nouveau_drm(dev); struct nouveau_cli *cli; + char name[16]; int ret; - ret = nouveau_cli_create(pdev, fpriv->pid, sizeof(*cli), (void **)&cli); + snprintf(name, sizeof(name), "%d", fpriv->pid); + + ret = nouveau_cli_create(pdev, name, sizeof(*cli), (void **)&cli); if (ret) return ret; |