summaryrefslogtreecommitdiff
path: root/linux-core/i810_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/i810_drv.c')
-rw-r--r--linux-core/i810_drv.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/linux-core/i810_drv.c b/linux-core/i810_drv.c
index df48ebcf..bfeb35a8 100644
--- a/linux-core/i810_drv.c
+++ b/linux-core/i810_drv.c
@@ -52,7 +52,7 @@ static int postinit(struct drm_device *dev, unsigned long flags)
DRIVER_MAJOR,
DRIVER_MINOR,
DRIVER_PATCHLEVEL,
- DRIVER_DATE, dev->minor, pci_pretty_name(dev->pdev)
+ DRIVER_DATE, dev->primary.minor, pci_pretty_name(dev->pdev)
);
return 0;
}
@@ -92,6 +92,7 @@ static drm_ioctl_desc_t ioctls[] = {
[DRM_IOCTL_NR(DRM_I810_FLIP)] = {i810_flip_bufs, 1, 0}
};
+static int probe(struct pci_dev *pdev, const struct pci_device_id *ent);
static struct drm_driver driver = {
.driver_features =
DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | DRIVER_USE_MTRR |
@@ -108,36 +109,34 @@ static struct drm_driver driver = {
.ioctls = ioctls,
.num_ioctls = DRM_ARRAY_SIZE(ioctls),
.fops = {
- .owner = THIS_MODULE,
- .open = drm_open,
- .release = drm_release,
- .ioctl = drm_ioctl,
- .mmap = i810_mmap_buffers,
- .fasync = drm_fasync,
- }
- ,
+ .owner = THIS_MODULE,
+ .open = drm_open,
+ .release = drm_release,
+ .ioctl = drm_ioctl,
+ .mmap = i810_mmap_buffers,
+ .fasync = drm_fasync,
+ },
+ .pci_driver = {
+ .name = DRIVER_NAME,
+ .id_table = pciidlist,
+ .probe = probe,
+ .remove = __devexit_p(drm_cleanup_pci),
+ }
};
static int probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
- return drm_probe(pdev, ent, &driver);
+ return drm_get_dev(pdev, ent, &driver);
}
-static struct pci_driver pci_driver = {
- .name = DRIVER_NAME,
- .id_table = pciidlist,
- .probe = probe,
- .remove = __devexit_p(drm_cleanup_pci),
-};
-
static int __init i810_init(void)
{
- return drm_init(&pci_driver, pciidlist, &driver);
+ return drm_init(&driver, pciidlist);
}
static void __exit i810_exit(void)
{
- drm_exit(&pci_driver);
+ drm_exit(&driver);
}
module_init(i810_init);