From: Andrew Morton <akpm@linux-foundation.org>
To: Tilman Schmidt <tilman@imap.cc>
Cc: linux-kernel@vger.kernel.org, gregkh@suse.de,
linux-usb-devel@lists.sourceforge.net, hjlipp@web.de,
kkeil@suse.de, i4ldeveloper@listserv.isdn4linux.de
Subject: Re: [PATCH 3/4] bas_gigaset: suspend support (v2)
Date: Thu, 15 Nov 2007 14:50:22 -0800 [thread overview]
Message-ID: <20071115145022.99f9abbc.akpm@linux-foundation.org> (raw)
In-Reply-To: <20071112-patch3@xenon.ts.pxnet.com>
On Tue, 13 Nov 2007 18:30:30 +0100 (CET)
Tilman Schmidt <tilman@imap.cc> wrote:
> From: Tilman Schmidt <tilman@imap.cc>
>
> This patch adds basic suspend/resume support to the bas_gigaset ISDN
> driver for the Siemens Gigaset SX255 series of ISDN DECT bases.
>
> Only the USB aspects are handled so far; the ISDN subsystem is not
> notified in any way, for lack of information about how to do that.
> The driver will refuse to suspend if a connection is active.
>
> ...
>
> + if (atomic_read(&cs->hw.bas->basstate) & BS_SUSPEND) {
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.
next parent reply other threads:[~2007-11-15 22:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071112-patch0@xenon.ts.pxnet.com>
[not found] ` <20071112-patch3@xenon.ts.pxnet.com>
2007-11-15 22:50 ` Andrew Morton [this message]
2007-11-15 23:51 ` [PATCH 3/4] bas_gigaset: suspend support (v2) Tilman Schmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071115145022.99f9abbc.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=hjlipp@web.de \
--cc=i4ldeveloper@listserv.isdn4linux.de \
--cc=kkeil@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=tilman@imap.cc \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox