Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 75404804 authored by Brahmaji K's avatar Brahmaji K Committed by Gerrit - the friendly Code Review server
Browse files

tz_log: Do not add hyp files in tzdbg directory



If the target does not support hyp, then no need to
add the hyp files in tzdbg directory. So skip adding
of hyp files when hyp is not supported.

Change-Id: Ie9ce86b01fce82aa68b969fd19868d94849bc814
Signed-off-by: default avatarBrahmaji K <bkomma@codeaurora.org>
parent 7d7aefae
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -931,6 +931,12 @@ static int tzdbgfs_init(struct platform_device *pdev)

	for (i = 0; i < TZDBG_STATS_MAX; i++) {
		tzdbg.debug_tz[i] = i;
		/* Do not create hyp entries in debugfs when hyplog flag is not
		   enabled in dtsi. */
		if (!tzdbg.is_hyplog_enabled &&
		    ((TZDBG_HYP_LOG == tzdbg.debug_tz[i]) ||
		     (TZDBG_HYP_GENERAL == tzdbg.debug_tz[i])))
			continue;
		dent = debugfs_create_file(tzdbg.stat[i].name,
				S_IRUGO, dent_dir,
				&tzdbg.debug_tz[i], &tzdbg_fops);