static void nsc_ircc_cleanup(void)
{
	int i;

	pm_unregister_all(nsc_ircc_pmproc);

	for (i=0; i < 4; i++) {
		if (dev_self[i])
			nsc_ircc_close(dev_self[i]);
	}
}
Exemple #2
0
static void __exit cleanup_nm256 (void)
{
    if (loaded) {
	struct nm256_info *card;
	struct nm256_info *next_card;

	for (card = nmcard_list; card != NULL; card = next_card) {
	    stopPlay (card);
	    stopRecord (card);
	    if (card->has_irq)
		free_irq (card->irq, card);
	    nm256_release_ports (card);
	    sound_unload_mixerdev (card->mixer_oss_dev);
	    sound_unload_audiodev (card->dev[0]);
	    sound_unload_audiodev (card->dev[1]);
	    next_card = card->next_card;
	    kfree (card);
	}
	nmcard_list = NULL;
    }
    pm_unregister_all (&handle_pm_event);
}
Exemple #3
0
static void __exit cleanup_nm256 (void)
{
    pci_unregister_driver(&nm256_pci_driver);
    pm_unregister_all (&handle_pm_event);
}
Exemple #4
0
/* bi_modexit - decommission bus interface driver
 */
static void __exit bi_modexit (void)
{
	struct usb_bus_instance *bus;
	struct usb_device_instance *device;
	struct bi_data *data;

	dbgENTER (dbgflg_usbdbi_init, 1);

#ifdef CONFIG_USBD_PROCFS
	remove_proc_entry ("usbd", NULL);
#endif

        udc_disconnect ();
        udc_disable ();

	if ((device = device_array[0])) {

		// XXX moved to usbd_deregister_device()
		//device->status = USBD_CLOSING;

		// XXX XXX
		if (dbgflg_usbdbi_tick > 0) {
			ticker_killoff ();
		}

		bus = device->bus;
		data = bus->privdata;

		// XXX
		usbd_device_event (device, DEVICE_RESET, 0);
		usbd_device_event (device, DEVICE_POWER_INTERRUPTION, 0);
		usbd_device_event (device, DEVICE_HUB_RESET, 0);

		dbg_init (1, "DEVICE_DESTROY");
		usbd_device_event (device, DEVICE_DESTROY, 0);


		dbg_init (1, "DISABLE ENDPOINTS");
		bi_disable_endpoints (device);

		//dbg_init(1,"UDC_DISABLE");
		//udc_disable();

		dbg_init (1, "BI_UDC_EXIT");
		bi_udc_exit ();

		device_array[0] = NULL;
		//bus->privdata = NULL; // XXX moved to usbd-bus.c usbd_deregister_device()


#if defined(CONFIG_PM) && !defined(CONFIG_USBD_MONITOR) && !defined(CONFIG_USBD_MONITOR_MODULE)
		dbg_init (1, "PM_UNREGISTER(pm_dev#%p)", pm_dev);
		if (pm_dev) {
			pm_unregister_all(bi_pm_event);
		}
#endif

#ifdef CONFIG_DPM	/* MVL-CEE */
	bi_udc_ldm_device_unregister();
	bi_udc_ldm_driver_unregister();
#endif

		dbg_init (1, "DEREGISTER DEVICE");
		usbd_deregister_device (device);
		bus->device = NULL;

		dbg_init (1, "kfree(data#%p)", data);
		if (data) {
			kfree (data);
		}

		if (bus->serial_number_str) {
			kfree (bus->serial_number_str);
		}

		dbg_init (1, "DEREGISTER BUS");
		usbd_deregister_bus (bus);

	} else {
		dbg_init (0, "device is NULL");
	}
	dbg_init (1, "BI_EXIT");
	bi_exit ();
	dbgLEAVE (dbgflg_usbdbi_init, 1);
}