Re: [PATCH 3/4] bas_gigaset: suspend support (v2)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Tilman Schmidt <tilman@...>
Cc: <linux-kernel@...>, <gregkh@...>, <linux-usb-devel@...>, <hjlipp@...>, <kkeil@...>, <i4ldeveloper@...>
Date: Thursday, November 15, 2007 - 6:50 pm

On Tue, 13 Nov 2007 18:30:30 +0100 (CET)
Tilman Schmidt <tilman@imap.cc> wrote:


that's pretty peculiar.  We'd only expect to see atomics being used in
conjunction with atomic_add/sub/inc/etc.  Here the driver is using an
atomic_t as a state variable.  And here's the magic bit:

	spin_lock_irqsave(&ucs->lock, flags);
	state = atomic_read(&ucs->basstate);
	atomic_set(&ucs->basstate, (state & ~clear) | set);
	spin_unlock_irqrestore(&ucs->lock, flags);

I'm suspecting that a plain old `int' would be more appropriate here.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 3/4] bas_gigaset: suspend support (v2), Andrew Morton, (Thu Nov 15, 6:50 pm)
Re: [PATCH 3/4] bas_gigaset: suspend support (v2), Tilman Schmidt, (Thu Nov 15, 7:51 pm)