Beispiel #1
0
static void __exit
gpio_exit(void)
{
	int i;

//	for (i = 0; i < ARRAYSIZE(gpio_file); i++)
//		devfs_unregister(gpio_file[i].handle);
//	devfs_unregister(gpio_dir);
//	devfs_unregister_chrdev(gpio_major, "gpio");
	si_detach(gpio_sih);
}
static void __exit
gpio_exit(void)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
	if (gpiodev_class != NULL) {
		class_device_destroy(gpiodev_class, MKDEV(gpio_major, 0));
		class_destroy(gpiodev_class);
	}

	gpiodev_class = NULL;
	if (gpio_major >= 0)
		unregister_chrdev(gpio_major, "gpio");
#else
	if (gpiodev_handle != NULL)
		devfs_unregister(gpiodev_handle);
	gpiodev_handle = NULL;
	devfs_unregister_chrdev(gpio_major, "gpio");
#endif
	si_detach(gpio_sih);
}
Beispiel #3
0
static void
chipdetach(struct bcm4xxx *ch)
{
	ET_TRACE(("et%d: chipdetach\n", ch->etc->unit));

	if (ch == NULL)
		return;

#ifdef ETROBO
	/* free robo state */
	if (ch->etc->robo)
		bcm_robo_detach(ch->etc->robo);
#endif /* ETROBO */

#ifdef ETADM
	/* free ADMtek state */
	if (ch->adm)
		adm_detach(ch->adm);
#endif /* ETADM */

	/* free dma state */
	if (ch->di)
		dma_detach(ch->di);
	ch->di = NULL;

	/* put the core back into reset */
	if (ch->sih)
		si_core_disable(ch->sih, 0);

	/* free si handle */
	si_detach(ch->sih);
	ch->sih = NULL;

	/* free vars */
	if (ch->vars)
		MFREE(ch->osh, ch->vars, ch->vars_size);

	/* free chip private state */
	MFREE(ch->osh, ch, sizeof(struct bcm4xxx));
}
Beispiel #4
0
static void
gen_gpio_exit(void)
{
	si_detach(gpio_sih);
}
/* Unregister a stream interface handler. This must be called by the handler task
 * itself when it detects that it is in the SI_ST_DIS state.
 */
void stream_int_unregister_handler(struct stream_interface *si)
{
	si_detach(si);
}
Beispiel #6
0
static void __exit gpio_exit(void)
{
	int i;

	si_detach(gpio_sih);
}