diff options
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/via_drv.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/shared-core/via_drv.c b/shared-core/via_drv.c index 994e9959..d22932ec 100644 --- a/shared-core/via_drv.c +++ b/shared-core/via_drv.c @@ -36,7 +36,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; } @@ -71,6 +71,7 @@ static drm_ioctl_desc_t ioctls[] = { [DRM_IOCTL_NR(DRM_VIA_PCICMD)] = {via_pci_cmdbuffer, 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_USE_MTRR | DRIVER_HAVE_IRQ | @@ -90,35 +91,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 = drm_mmap, - .fasync = drm_fasync, - }, + .owner = THIS_MODULE, + .open = drm_open, + .release = drm_release, + .ioctl = drm_ioctl, + .mmap = drm_mmap, + .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 via_init(void) { - return drm_init(&pci_driver, pciidlist, &driver); + return drm_init(&driver, pciidlist); } static void __exit via_exit(void) { - drm_exit(&pci_driver); + drm_exit(&driver); } module_init(via_init); |