diff options
author | Jon Smirl <jonsmirl@yahoo.com> | 2004-10-12 03:59:17 +0000 |
---|---|---|
committer | Jon Smirl <jonsmirl@yahoo.com> | 2004-10-12 03:59:17 +0000 |
commit | ad70dc676ebf8f2f86d171dccb873a04a3e5b87b (patch) | |
tree | 1ee7e58021f8348bff535b1301c3c50d99572f48 /linux-core/mach64_drv.c | |
parent | ad549c5ae62fd75aa2bdb8bf5efc4913c476cb02 (diff) |
Breakout heads into their own data structures.
Diffstat (limited to 'linux-core/mach64_drv.c')
-rw-r--r-- | linux-core/mach64_drv.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/linux-core/mach64_drv.c b/linux-core/mach64_drv.c index c70ce061..e1be1fa8 100644 --- a/linux-core/mach64_drv.c +++ b/linux-core/mach64_drv.c @@ -42,7 +42,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; } @@ -81,6 +81,7 @@ static drm_ioctl_desc_t ioctls[] = { [DRM_IOCTL_NR(DRM_MACH64_GETPARAM)] = {mach64_get_param, 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_PCI_DMA | DRIVER_HAVE_DMA @@ -100,35 +101,35 @@ static struct drm_driver driver = { .num_ioctls = DRM_ARRAY_SIZE(ioctls), .dma_ioctl = mach64_dma_buffers, .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 mach64_init(void) { - return drm_init(&pci_driver, pciidlist, &driver); + return drm_init(&driver, pciidlist); } static void __exit mach64_exit(void) { - drm_exit(&pci_driver); + drm_exit(&driver); } module_init(mach64_init); |