Ejemplo n.º 1
0
static int ztdummy_detach(dev_info_t *dip, ddi_detach_cmd_t cmd)
{
    int instance;
    struct ztdummy_state *ztd;

    instance = ddi_get_instance(dip);
    cmn_err(CE_CONT, "ztdummy%d: detach", instance);

    ztd = ddi_get_soft_state(ztdummy_statep, instance);
    if (ztd == NULL) {
        cmn_err(CE_CONT, "ztdummy%d: detach, failed to get soft state", instance);
        return DDI_FAILURE;
    }

    /* Remove high-resolution timer */
    cyclic_remove(ztd->cyclic);

    zt_unregister(&ztd->span);

    return DDI_SUCCESS;
}
Ejemplo n.º 2
0
static void t1_release(struct t1 *wc)
{
	zt_unregister(&wc->span);
	kfree(wc);
	printk("Freed a Wildcard TE12xP\n");
}