Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210709
b: refs/heads/master
c: b64c115
h: refs/heads/master
i:
  210707: 8a9cd98
v: v3
  • Loading branch information
Dave Airlie committed Sep 14, 2010
1 parent 9d819c6 commit e58ee01
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 930a9e283516a3a3595c0c515113f1b78d07f695
refs/heads/master: b64c115eb22516ecd187c74ad6de3f1693f1dc7b
4 changes: 4 additions & 0 deletions trunk/drivers/gpu/drm/drm_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
dev->hose = pdev->sysdata;
#endif

mutex_lock(&drm_global_mutex);

if ((ret = drm_fill_in_dev(dev, ent, driver))) {
printk(KERN_ERR "DRM: Fill_in_dev failed.\n");
goto err_g2;
Expand Down Expand Up @@ -199,6 +201,7 @@ int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
driver->name, driver->major, driver->minor, driver->patchlevel,
driver->date, pci_name(pdev), dev->primary->index);

mutex_unlock(&drm_global_mutex);
return 0;

err_g4:
Expand All @@ -210,6 +213,7 @@ int drm_get_pci_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
pci_disable_device(pdev);
err_g1:
kfree(dev);
mutex_unlock(&drm_global_mutex);
return ret;
}
EXPORT_SYMBOL(drm_get_pci_dev);
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/gpu/drm/drm_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ int drm_get_platform_dev(struct platform_device *platdev,
dev->platformdev = platdev;
dev->dev = &platdev->dev;

mutex_lock(&drm_global_mutex);

ret = drm_fill_in_dev(dev, NULL, driver);

if (ret) {
Expand Down Expand Up @@ -87,6 +89,8 @@ int drm_get_platform_dev(struct platform_device *platdev,

list_add_tail(&dev->driver_item, &driver->device_list);

mutex_unlock(&drm_global_mutex);

DRM_INFO("Initialized %s %d.%d.%d %s on minor %d\n",
driver->name, driver->major, driver->minor, driver->patchlevel,
driver->date, dev->primary->index);
Expand All @@ -100,6 +104,7 @@ int drm_get_platform_dev(struct platform_device *platdev,
drm_put_minor(&dev->control);
err_g1:
kfree(dev);
mutex_unlock(&drm_global_mutex);
return ret;
}
EXPORT_SYMBOL(drm_get_platform_dev);
Expand Down

0 comments on commit e58ee01

Please sign in to comment.