From dfb5ed21a379b178f4c5251cb7324f9fc37c1f6e Mon Sep 17 00:00:00 2001 From: "Se Wang (Patrick) Oh" Date: Thu, 17 Sep 2015 17:43:38 -0700 Subject: [PATCH] soc: qcom: socinfo: Fix to print correct images information 'images' sysfs node is supposed to dump information about all images without the need to write to select_image. But As it doesn't look up the next image correctly after a image which doesn't have information in SMEM, it prints only the information of the fist a few images. After increase the correct offset of SMEM address, 'images' can print all information correctly. Change-Id: I08dfb2812bde42dd661d5a85d473eaf60ef215c5 Signed-off-by: Se Wang (Patrick) Oh --- drivers/soc/qcom/socinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 005579ab6cd4..ba2fe31face7 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -954,8 +954,10 @@ msm_get_images(struct device *dev, *buf = '\0'; for (image = 0; image < SMEM_IMAGE_VERSION_BLOCKS_COUNT; image++) { - if (*image_address == '\0') + if (*image_address == '\0') { + image_address += SMEM_IMAGE_VERSION_SINGLE_BLOCK_SIZE; continue; + } pos += snprintf(buf + pos, PAGE_SIZE - pos, "%d:\n", image);