From 044fe386cb2425707ae0ac99b195fcc2438669c1 Mon Sep 17 00:00:00 2001 From: Wendy Liang Date: Thu, 14 Sep 2017 11:22:03 -0700 Subject: [PATCH] remoteproc: elf loader: revert obsolete change This patch is to revert the change to get the loaded resource table which is no longer required. The change to remove is part of commit 106a1dc8416d ("Merge tag 'v3.10' into master-next") Signed-off-by: Wendy Liang Signed-off-by: Michal Simek --- drivers/remoteproc/remoteproc_elf_loader.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c index d4cbed2c1157..f5080833d09d 100644 --- a/drivers/remoteproc/remoteproc_elf_loader.c +++ b/drivers/remoteproc/remoteproc_elf_loader.c @@ -321,14 +321,12 @@ rproc_elf_find_loaded_rsc_table(struct rproc *rproc, const struct firmware *fw) { struct elf32_hdr *ehdr = (struct elf32_hdr *)fw->data; struct elf32_shdr *shdr; - const u8 *elf_data = fw->data; - struct elf32_phdr *phdr = (struct elf32_phdr *)(elf_data + ehdr->e_phoff); shdr = find_table(&rproc->dev, ehdr, fw->size); if (!shdr) return NULL; - return rproc_da_to_va(rproc, shdr->sh_addr - phdr->p_vaddr + phdr->p_paddr, shdr->sh_size); + return rproc_da_to_va(rproc, shdr->sh_addr, shdr->sh_size); } /** -- 2.39.2