Implement linux_pci_unregister_drm_driver in linuxkpi so that drm drivers
can be unloaded. This patch is a part of D19565. Reviewed by: hps Approved by: imp (mentor), hps MFC after: 1 week
This commit is contained in:
parent
4ab18ea23a
commit
5098ed5f3b
@ -532,6 +532,7 @@ pci_write_config_dword(struct pci_dev *pdev, int where, u32 val)
|
||||
int linux_pci_register_driver(struct pci_driver *pdrv);
|
||||
int linux_pci_register_drm_driver(struct pci_driver *pdrv);
|
||||
void linux_pci_unregister_driver(struct pci_driver *pdrv);
|
||||
void linux_pci_unregister_drm_driver(struct pci_driver *pdrv);
|
||||
|
||||
#define pci_register_driver(pdrv) linux_pci_register_driver(pdrv)
|
||||
#define pci_unregister_driver(pdrv) linux_pci_unregister_driver(pdrv)
|
||||
|
@ -417,6 +417,22 @@ linux_pci_unregister_driver(struct pci_driver *pdrv)
|
||||
mtx_unlock(&Giant);
|
||||
}
|
||||
|
||||
void
|
||||
linux_pci_unregister_drm_driver(struct pci_driver *pdrv)
|
||||
{
|
||||
devclass_t bus;
|
||||
|
||||
bus = devclass_find("vgapci");
|
||||
|
||||
spin_lock(&pci_lock);
|
||||
list_del(&pdrv->links);
|
||||
spin_unlock(&pci_lock);
|
||||
mtx_lock(&Giant);
|
||||
if (bus != NULL)
|
||||
devclass_delete_driver(bus, &pdrv->bsddriver);
|
||||
mtx_unlock(&Giant);
|
||||
}
|
||||
|
||||
CTASSERT(sizeof(dma_addr_t) <= sizeof(uint64_t));
|
||||
|
||||
struct linux_dma_obj {
|
||||
|
Loading…
Reference in New Issue
Block a user