int esc_mods_pci_bus_add_dev(struct file *pfile, MODS_PCI_BUS_ADD_DEVICES *scan) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)) && defined(CONFIG_PCI) mods_info_printk("scanning pci bus %x\n", scan->Bus); /* initiate a PCI bus scan to find hotplugged PCI devices in domain 0 */ MODS_PCI_SCAN_CHILD_BUS(MODS_PCI_FIND_BUS(0, scan->Bus)); /* add newly found devices */ MODS_PCI_BUS_ADD_DEVICES(MODS_PCI_FIND_BUS(0, scan->Bus)); return OK; #else return -EINVAL; #endif }
static void __exit mods_exit_module(void) { LOG_ENT(); mods_cleanup_irq(); misc_deregister(&mods_dev); #ifdef CONFIG_ARCH_TEGRA mods_shutdown_clock_api(); #endif /* Check for memory leakage */ mods_check_mem(); mods_info_printk("driver unloaded\n"); LOG_EXT(); }