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

Commit e21c9933 authored by David Dai's avatar David Dai
Browse files

msm: msm_bus_dbg: create dbgfs client handles



Now that clients are no longer crashing during probe
and/or unregistering with the bus driver as part
of their probe failure, let's add the client
dump files back to debugfs.

Change-Id: I100d79350e7395b0a388969984ebdc9e4f84b676
Signed-off-by: default avatarDavid Dai <daidavid1@codeaurora.org>
parent 9d2c3982
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -833,6 +833,7 @@ static int __init msm_bus_debugfs_init(void)
{
	struct dentry *commit, *shell_client, *rules_dbg;
	struct msm_bus_fab_list *fablist;
	struct msm_bus_cldata *cldata = NULL;
	uint64_t val = 0;

	dir = debugfs_create_dir("msm-bus-dbg", NULL);
@@ -894,6 +895,28 @@ static int __init msm_bus_debugfs_init(void)
		goto err;
	}

	rt_mutex_lock(&msm_bus_dbg_cllist_lock);
	list_for_each_entry(cldata, &cl_list, list) {
		if (cldata->pdata) {
			if (cldata->pdata->name == NULL) {
				MSM_BUS_DBG("Client name not found\n");
				continue;
			}
			cldata->file = msm_bus_dbg_create(cldata->pdata->name,
					0444, clients, cldata->clid);
		} else if (cldata->handle) {
			if (cldata->handle->name == NULL) {
				MSM_BUS_DBG("Client doesn't have a name\n");
				continue;
			}
			cldata->file = debugfs_create_file(cldata->handle->name,
							0444, clients,
							(void *)cldata->handle,
							&client_data_fops);
		}
	}
	rt_mutex_unlock(&msm_bus_dbg_cllist_lock);

	if (debugfs_create_file("dump_clients", 0644,
		clients, NULL, &msm_bus_dbg_dump_clients_fops) == NULL)
		goto err;