/* Deinit the global variables */
void auerisdn_cleanup(void)
{
	struct auerhisax *ahp;
	int i;

	/* cleanup last allocated device first */
	for (i = AUER_MAX_DEVICES - 1; i >= 0; i--) {
		ahp = &auerhisax_table[i];
		if (ahp->cp) {
			err("hisax device %d open at cleanup", i);
		}
		if (ahp->hisax_registered) {
			hisax_unregister(&ahp->hisax_d_if);
			dbg("hisax interface %d freed", i);
		}
	}
}
示例#2
0
文件: st5481_init.c 项目: nhanh0/hah
/*
 * This function will be called when the adapter is removed
 * from the USB bus.
 */
static void __devexit disconnect_st5481(struct usb_device *dev, void *arg)
{
    struct st5481_adapter *adapter = arg;

    DBG(1,"");

    list_del(&adapter->list);

    st5481_stop(adapter);
    st5481_release_b(&adapter->bcs[1]);
    st5481_release_b(&adapter->bcs[0]);
    st5481_release_d(adapter);
    // we would actually better wait for completion of outstanding urbs
    mdelay(2);
    st5481_release_usb(adapter);

    hisax_unregister(&adapter->hisax_d_if);

    kfree(adapter);
}
示例#3
0
/*
 * This function will be called when the adapter is removed
 * from the USB bus.
 */
static void disconnect_st5481(struct usb_interface *intf)
{
	struct st5481_adapter *adapter = usb_get_intfdata(intf);

	DBG(1,"");

	usb_set_intfdata(intf, NULL);
	if (!adapter)
		return;
	
	st5481_stop(adapter);
	st5481_release_b(&adapter->bcs[1]);
	st5481_release_b(&adapter->bcs[0]);
	st5481_release_d(adapter);
	// we would actually better wait for completion of outstanding urbs
	mdelay(2);
	st5481_release_usb(adapter);

	hisax_unregister(&adapter->hisax_d_if);

	kfree(adapter);
}
示例#4
0
static void delete_adapter(struct fritz_adapter *adapter)
{
	hisax_unregister(&adapter->isac.hisax_d_if);
	list_del(&adapter->list);
	kfree(adapter);
}