示例#1
0
static int ufs_test_probe(struct test_iosched *test_iosched)
{
	struct ufs_test_data *utd;
	int ret;

	utd = kzalloc(sizeof(*utd), GFP_KERNEL);
	if (!utd) {
		pr_err("%s: failed to allocate ufs test data\n", __func__);
		return -ENOMEM;
	}

	init_waitqueue_head(&utd->wait_q);
	utd->test_iosched = test_iosched;
	test_iosched->blk_dev_test_data = utd;

	ret = ufs_test_debugfs_init(utd);
	if (ret) {
		pr_err("%s: failed to init debug-fs entries, ret=%d\n",
			__func__, ret);
		kfree(utd);
	}

	return ret;
}
static void ufs_test_probe(void)
{
	ufs_test_debugfs_init();
}