aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_pci.c4
-rw-r--r--drivers/gpu/drm/drm_stub.c4
-rw-r--r--include/drm/drmP.h4
3 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index f710e3d9d847..6dfae6b3c0bc 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -276,7 +276,7 @@ static void drm_pci_agp_init(struct drm_device *dev)
276 } 276 }
277} 277}
278 278
279static void drm_pci_agp_destroy(struct drm_device *dev) 279void drm_pci_agp_destroy(struct drm_device *dev)
280{ 280{
281 if (dev->agp) { 281 if (dev->agp) {
282 arch_phys_wc_del(dev->agp->agp_mtrr); 282 arch_phys_wc_del(dev->agp->agp_mtrr);
@@ -293,7 +293,6 @@ static struct drm_bus drm_pci_bus = {
293 .set_busid = drm_pci_set_busid, 293 .set_busid = drm_pci_set_busid,
294 .set_unique = drm_pci_set_unique, 294 .set_unique = drm_pci_set_unique,
295 .irq_by_busid = drm_pci_irq_by_busid, 295 .irq_by_busid = drm_pci_irq_by_busid,
296 .agp_destroy = drm_pci_agp_destroy,
297}; 296};
298 297
299/** 298/**
@@ -457,6 +456,7 @@ int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver)
457 return -1; 456 return -1;
458} 457}
459 458
459void drm_pci_agp_destroy(struct drm_device *dev) {}
460#endif 460#endif
461 461
462EXPORT_SYMBOL(drm_pci_init); 462EXPORT_SYMBOL(drm_pci_init);
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index 128a2b7a1f66..a4a5c6ac110a 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -592,8 +592,8 @@ void drm_dev_unregister(struct drm_device *dev)
592 if (dev->driver->unload) 592 if (dev->driver->unload)
593 dev->driver->unload(dev); 593 dev->driver->unload(dev);
594 594
595 if (dev->driver->bus->agp_destroy) 595 if (dev->agp)
596 dev->driver->bus->agp_destroy(dev); 596 drm_pci_agp_destroy(dev);
597 597
598 drm_vblank_cleanup(dev); 598 drm_vblank_cleanup(dev);
599 599
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 50a54c069518..8e05ff81428d 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -766,9 +766,6 @@ struct drm_bus {
766 int (*set_unique)(struct drm_device *dev, struct drm_master *master, 766 int (*set_unique)(struct drm_device *dev, struct drm_master *master,
767 struct drm_unique *unique); 767 struct drm_unique *unique);
768 int (*irq_by_busid)(struct drm_device *dev, struct drm_irq_busid *p); 768 int (*irq_by_busid)(struct drm_device *dev, struct drm_irq_busid *p);
769 /* hooks that are for PCI */
770 void (*agp_destroy)(struct drm_device *dev);
771
772}; 769};
773 770
774/** 771/**
@@ -1684,6 +1681,7 @@ static __inline__ int drm_pci_device_is_agp(struct drm_device *dev)
1684 1681
1685 return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP); 1682 return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP);
1686} 1683}
1684void drm_pci_agp_destroy(struct drm_device *dev);
1687 1685
1688extern int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver); 1686extern int drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver);
1689extern void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver); 1687extern void drm_pci_exit(struct drm_driver *driver, struct pci_driver *pdriver);