linux-mips
[Top] [All Lists]

Re: [PATCH] serial: Initialize spinlocks in 8250 and don't clobber them.

To: David Daney <ddaney@caviumnetworks.com>
Subject: Re: [PATCH] serial: Initialize spinlocks in 8250 and don't clobber them.
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
Date: Tue, 21 Oct 2008 16:50:18 +0100
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, Tomaso.Paoletti@caviumnetworks.com
In-reply-to: <48FDF6CB.4070605@caviumnetworks.com>
Organization: Red Hat UK Cyf., Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, Y Deyrnas Gyfunol. Cofrestrwyd yng Nghymru a Lloegr o'r rhif cofrestru 3798903
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <48F51114.2010105@caviumnetworks.com> <20081020141750.d0610586.akpm@linux-foundation.org> <20081021103833.5e960c8d@lxorguk.ukuu.org.uk> <48FDF6CB.4070605@caviumnetworks.com>
Sender: linux-mips-bounce@linux-mips.org
> The question is:  What is the best way to initialize some (or all) fields of 
> a structure *except* a single lock field that was previously initialized?

Move the initialisation - or at least memset to zero then spin_lock_init
and fill in the other fields later.

<Prev in Thread] Current Thread [Next in Thread>