Esempio n. 1
0
static void __exit logcap_exit(void) {
	int r;
	st_logcap_reg *rst;

	if (hooked) {
		hook_exit();
		hooked = false;
	}

	remove_proc_entry("rd_count", proc_root);
	remove_proc_entry("wr_count", proc_root);
	remove_proc_entry("log_enable", proc_root);

	remove_proc_entry("map", proc_root);

	//proc cleanup
	for (r=0; r<MAX_REGS; r++) if (store->r[r].reg) {

		rst = &store->r[r];

		if (rst->proc_mask != NULL) {
			remove_proc_entry("mask", rst->proc_dir);
			rst->proc_mask = NULL;
		}
		if (rst->proc_value != NULL) {
			remove_proc_entry("val", rst->proc_dir);
			rst->proc_value = NULL;
		}

		scnprintf(buf, sizeof(buf), REG_FMT, r);
		remove_proc_entry(buf, proc_root);
		rst->reg = 0;
	}
	vfree(store);
	remove_proc_entry(TAG, NULL);
}
static void __exit mmcfix_exit(void)
{
	hook_exit();
}