msm: smem_log: Fix handling of default logging area

Fix code that was always using the default logging
area when copying log data to userspace, even if
a different logging area had been selected.

Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
diff --git a/arch/arm/mach-msm/smem_log.c b/arch/arm/mach-msm/smem_log.c
index f0e81c5..1cb0440 100644
--- a/arch/arm/mach-msm/smem_log.c
+++ b/arch/arm/mach-msm/smem_log.c
@@ -893,19 +893,19 @@
 	unsigned long flags;
 	int ret;
 	int tot_bytes = 0;
-	struct smem_log_inst *inst;
+	struct smem_log_inst *local_inst;
 
-	inst = fp->private_data;
+	local_inst = fp->private_data;
 
-	remote_spin_lock_irqsave(inst->remote_spinlock, flags);
+	remote_spin_lock_irqsave(local_inst->remote_spinlock, flags);
 
-	orig_idx = *inst->idx;
+	orig_idx = *local_inst->idx;
 	idx = orig_idx;
 
 	while (1) {
 		idx--;
 		if (idx < 0)
-			idx = inst->num - 1;
+			idx = local_inst->num - 1;
 		if (idx == orig_idx) {
 			ret = tot_bytes;
 			break;
@@ -916,7 +916,7 @@
 			break;
 		}
 
-		ret = copy_to_user(buf, &inst[GEN].events[idx],
+		ret = copy_to_user(buf, &local_inst->events[idx],
 				   sizeof(struct smem_log_item));
 		if (ret) {
 			ret = -EIO;
@@ -928,7 +928,7 @@
 		buf += sizeof(struct smem_log_item);
 	}
 
-	remote_spin_unlock_irqrestore(inst->remote_spinlock, flags);
+	remote_spin_unlock_irqrestore(local_inst->remote_spinlock, flags);
 
 	return ret;
 }