aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorSubramaniam C.A <subramaniam.ca@ti.com>2012-01-30 10:18:26 -0600
committerZiyan <jaraidaniel@gmail.com>2015-05-01 18:27:29 +0200
commit1acba6ca3c0dd79961ab9cbe8c7b451a55994b84 (patch)
treed3cdc6be49af89eff2ace0703ff07511e97db2cd /drivers/remoteproc
parent5eee0b4d3f7b5bf9abb66b2191d8190e2aae2333 (diff)
downloadkernel_samsung_tuna-1acba6ca3c0dd79961ab9cbe8c7b451a55994b84.tar.gz
kernel_samsung_tuna-1acba6ca3c0dd79961ab9cbe8c7b451a55994b84.tar.bz2
kernel_samsung_tuna-1acba6ca3c0dd79961ab9cbe8c7b451a55994b84.zip
remoteproc: create version debugfs after image is loaded
This patch ensures that the image version debugfs entry is created only after the image is loaded. Version info is not available before the image is loaded. If the debugfs entry is created before, then it results in a kernel panic. Change-Id: I7311b4a832b5e897ca10f1290900b3178e2c544d Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Diffstat (limited to 'drivers/remoteproc')
-rwxr-xr-xdrivers/remoteproc/remoteproc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/remoteproc/remoteproc.c b/drivers/remoteproc/remoteproc.c
index 12dd4ddc4e0..0f7b9a328a7 100755
--- a/drivers/remoteproc/remoteproc.c
+++ b/drivers/remoteproc/remoteproc.c
@@ -1149,6 +1149,9 @@ static void rproc_loader_cont(const struct firmware *fw, void *context)
memcpy(rproc->header, image->header, image->header_len);
rproc->header_len = image->header_len;
+ debugfs_create_file("version", 0444, rproc->dbg_dir, rproc,
+ &rproc_version_ops);
+
/* Ensure we recognize this BIOS version: */
if (image->version != RPROC_BIOS_VERSION) {
dev_err(dev, "Expected BIOS version: %d!\n",
@@ -1748,8 +1751,6 @@ int rproc_register(struct device *dev, const char *name,
debugfs_create_file("name", 0444, rproc->dbg_dir, rproc,
&rproc_name_ops);
- debugfs_create_file("version", 0444, rproc->dbg_dir, rproc,
- &rproc_version_ops);
out:
return 0;
}