Commit a13c13a2 authored by Dave Airlie's avatar Dave Airlie

drm: move the enable device before filling in device info

This moves the pci_enable_device to before the device info is 
filled out as without routeirq this goes wrong..

Thanks to Ralf Gerbig <rge@quengel.org> for testing this.
Signed-off-by: default avatarDave Airlie <airlied@linux.ie>
parent e7e44570
...@@ -192,6 +192,9 @@ int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_ ...@@ -192,6 +192,9 @@ int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_
*minors = (drm_minor_t){.dev = dev, .type=DRM_MINOR_PRIMARY}; *minors = (drm_minor_t){.dev = dev, .type=DRM_MINOR_PRIMARY};
dev->minor = minor; dev->minor = minor;
pci_enable_device(pdev);
if ((ret=drm_fill_in_dev(dev, pdev, ent, driver))) { if ((ret=drm_fill_in_dev(dev, pdev, ent, driver))) {
printk(KERN_ERR "DRM: Fill_in_dev failed.\n"); printk(KERN_ERR "DRM: Fill_in_dev failed.\n");
goto err_g1; goto err_g1;
...@@ -201,7 +204,6 @@ int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_ ...@@ -201,7 +204,6 @@ int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent, struct drm_
goto err_g1; goto err_g1;
} }
pci_enable_device(pdev);
dev_class = class_simple_device_add(drm_class, dev_class = class_simple_device_add(drm_class,
MKDEV(DRM_MAJOR, minor), &pdev->dev, "card%d", minor); MKDEV(DRM_MAJOR, minor), &pdev->dev, "card%d", minor);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment