summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2004-10-05 02:58:14 +0000
committerJon Smirl <jonsmirl@yahoo.com>2004-10-05 02:58:14 +0000
commit6dee8401a65c2b976dad8937985439fb8f0887be (patch)
tree5a98ca005d032e227149c49719d5d61640146706
parentaba12cfc0e80694457347dc9d0ed78cd78192ea3 (diff)
enable the device in the right order, remove __devinit from drm_int
-rw-r--r--linux-core/drm_drv.c2
-rw-r--r--linux-core/drm_stub.c20
2 files changed, 11 insertions, 11 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 3cc8da02..81ec1c76 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -318,7 +318,7 @@ MODULE_PARM(drm_opts, "s");
* Expands the \c DRIVER_PREINIT and \c DRIVER_POST_INIT macros before and
* after the initialization for driver customization.
*/
-int __devinit drm_init(struct pci_driver *driver,
+int drm_init(struct pci_driver *driver,
struct pci_device_id *pciidlist,
struct drm_driver_fn *driver_fn)
{
diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c
index 6f4753dd..ed4cd19b 100644
--- a/linux-core/drm_stub.c
+++ b/linux-core/drm_stub.c
@@ -166,8 +166,13 @@ int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent,
return -ENOMEM;
*minors = (drm_minor_t) {
- .dev = dev,.class = DRM_MINOR_PRIMARY};
+ .dev = dev,.class = DRM_MINOR_PRIMARY};
dev->minor = minor;
+ if (!drm_fb_loaded) {
+ pci_set_drvdata(pdev, dev);
+ pci_request_regions(pdev, DRIVER_NAME);
+ pci_enable_device(pdev);
+ }
if ((ret = fill_in_dev(dev, pdev, ent, driver_fn))) {
printk(KERN_ERR "DRM: Fill_in_dev failed.\n");
goto err_g1;
@@ -179,11 +184,6 @@ int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent,
"DRM: Failed to initialize /proc/dri.\n");
goto err_g1;
}
- if (!drm_fb_loaded) {
- pci_set_drvdata(pdev, dev);
- pci_request_regions(pdev, DRIVER_NAME);
- pci_enable_device(pdev);
- }
dev_class = drm_sysfs_device_add(drm_class,
MKDEV(DRM_MAJOR,
minor),
@@ -202,16 +202,16 @@ int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent,
}
DRM_ERROR("out of minors\n");
return -ENOMEM;
- err_g2:
+err_g2:
+ drm_proc_cleanup(minor, drm_proc_root, minors->dev_root);
+err_g1:
if (!drm_fb_loaded) {
pci_set_drvdata(pdev, NULL);
pci_release_regions(pdev);
pci_disable_device(pdev);
}
- drm_proc_cleanup(minor, drm_proc_root, minors->dev_root);
- err_g1:
*minors = (drm_minor_t) {
- .dev = NULL,.class = DRM_MINOR_FREE};
+ .dev = NULL,.class = DRM_MINOR_FREE};
drm_free(dev, sizeof(*dev), DRM_MEM_STUB);
return ret;
}