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

Commit e51c1596 authored by Se Wang (Patrick) Oh's avatar Se Wang (Patrick) Oh
Browse files

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: default avatarSe Wang (Patrick) Oh <sewango@codeaurora.org>
parent 13848461
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -967,8 +967,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);