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

Commit bde88f28 authored by Jeff Hugo's avatar Jeff Hugo
Browse files

msm: smem_debug: Use smem_find_to_proc()



smem_find() is deprecated.  Use the replacement function,
smem_find_to_proc(), instead.

Change-Id: I5ca8a1c42f9eb98791d4c279d63f4ab82cb08e4c
Signed-off-by: default avatarJeffrey Hugo <jhugo@codeaurora.org>
parent 525300f5
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -122,7 +122,8 @@ static void debug_modem_err(struct seq_file *s)
	char *x;
	int size;

	x = smem_find(ID_DIAG_ERR_MSG, SZ_DIAG_ERR_MSG);
	x = smem_find_to_proc(ID_DIAG_ERR_MSG, SZ_DIAG_ERR_MSG, 0,
							SMEM_ANY_HOST_FLAG);
	if (x != 0) {
		x[SZ_DIAG_ERR_MSG - 1] = 0;
		seq_printf(s, "smem: DIAG '%s'\n", x);
@@ -140,7 +141,8 @@ static void debug_read_diag_msg(struct seq_file *s)
{
	char *msg;

	msg = smem_find(ID_DIAG_ERR_MSG, SZ_DIAG_ERR_MSG);
	msg = smem_find_to_proc(ID_DIAG_ERR_MSG, SZ_DIAG_ERR_MSG, 0,
							SMEM_ANY_HOST_FLAG);

	if (msg) {
		msg[SZ_DIAG_ERR_MSG - 1] = 0;
@@ -154,12 +156,16 @@ static void debug_read_mem(struct seq_file *s)
	struct smem_heap_info *heap_info;
	struct smem_heap_entry *toc;

	heap_info = smem_find(SMEM_HEAP_INFO, sizeof(struct smem_heap_info));
	heap_info = smem_find_to_proc(SMEM_HEAP_INFO,
						sizeof(struct smem_heap_info),
						0,
						SMEM_ANY_HOST_FLAG);
	if (!heap_info) {
		seq_puts(s, "SMEM_HEAP_INFO is NULL\n");
		return;
	}
	toc = smem_find(SMEM_ALLOCATION_TABLE, SZ_SMEM_ALLOCATION_TABLE);
	toc = smem_find_to_proc(SMEM_ALLOCATION_TABLE, SZ_SMEM_ALLOCATION_TABLE,
							0, SMEM_ANY_HOST_FLAG);
	if (!toc) {
		seq_puts(s, "SMEM_ALLOCATION_TABLE is NULL\n");
		return;
@@ -295,7 +301,8 @@ void smsm_print_sleep_info(uint32_t sleep_delay, uint32_t sleep_limit,
	pr_info("SMEM_SMSM_SLEEP_DELAY: %x\n", sleep_delay);
	pr_info("SMEM_SMSM_LIMIT_SLEEP: %x\n", sleep_limit);

	ptr = smem_find(SMEM_SLEEP_POWER_COLLAPSE_DISABLED, sizeof(*ptr));
	ptr = smem_find_to_proc(SMEM_SLEEP_POWER_COLLAPSE_DISABLED,
					sizeof(*ptr), 0, SMEM_ANY_HOST_FLAG);
	if (ptr)
		pr_info("SMEM_SLEEP_POWER_COLLAPSE_DISABLED: %x\n", *ptr);
	else
@@ -304,7 +311,8 @@ void smsm_print_sleep_info(uint32_t sleep_delay, uint32_t sleep_limit,
	pr_info("SMEM_SMSM_INT_INFO %x %x %x\n",
		irq_mask, pending_irqs, wakeup_reason);

	gpio = smem_find(SMEM_GPIO_INT, sizeof(*gpio));
	gpio = smem_find_to_proc(SMEM_GPIO_INT, sizeof(*gpio), 0,
							SMEM_ANY_HOST_FLAG);
	if (gpio) {
		int i;
		for (i = 0; i < NUM_GPIO_INT_REGISTERS; i++)