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

Commit 079b55e0 authored by Sreelakshmi Gownipalli's avatar Sreelakshmi Gownipalli Committed by Gerrit - the friendly Code Review server
Browse files

diag: Initialize spin lock once per memory device channel



Initialize the spin lock only once per memory device channel
while initializing the channel and channel buffers.

Change-Id: Iabf2db03436102310ef85f04b59e6160d49ef5f5
Signed-off-by: default avatarSreelakshmi Gownipalli <sgownipa@codeaurora.org>
parent 52a8c7f8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, 2016 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -356,8 +356,8 @@ int diag_md_init()
			ch->tbl[j].buf = NULL;
			ch->tbl[j].len = 0;
			ch->tbl[j].ctx = 0;
			spin_lock_init(&(ch->lock));
		}
		spin_lock_init(&(ch->lock));
	}

	return 0;