Linmodems Mailing list Archives

Google
 
Web archives.linmodems.org

Return-Path: <jamie@softmodem.org>
Mailing-List: contact discuss-help@linmodems.org; run by ezmlm
Delivered-To: mailing list discuss@linmodems.org
Received: (qmail 18485 invoked from network); 21 Apr 2004 01:49:55 -0000
Received: from mail.shareable.org (81.29.64.88)
  by www.linmodems.org with SMTP; 21 Apr 2004 01:49:55 -0000
Received: from mail.shareable.org (localhost [127.0.0.1])
	by mail.shareable.org (8.12.8/8.12.8) with ESMTP id i3L1nqn6023696;
	Wed, 21 Apr 2004 02:49:52 +0100
Received: (from jamie@localhost)
	by mail.shareable.org (8.12.8/8.12.8/Submit) id i3L1nqI2023694;
	Wed, 21 Apr 2004 02:49:52 +0100
Date: Wed, 21 Apr 2004 02:49:52 +0100
From: Jamie Lokier <jamie@softmodem.org>
To: "Omar A. S. Guerrero" <osgcon@yahoo.com.mx>
Cc: discuss@linmodems.org
Subject: Re: A problem compiling the driver...
Message-ID: <20040421014952.GA23621@mail.shareable.org>
References: <4080F75C.6000505@tsac.fsnet.co.uk> <20040418195302.9710.qmail@web13121.mail.yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20040418195302.9710.qmail@web13121.mail.yahoo.com>
User-Agent: Mutt/1.4.1i

Omar A. S. Guerrero wrote:
> The problem is effectively in the line [2815] on file ptserial-2.4.7,c .
>
> I solved the problem modifying the line 
>    if ((tty->count == 1) && (state->count != 1))
> by
>    if (((tty->count).counter == 1) && (state->count != 1)) {
>
> because tty->count isn't a 'int' but is a 'atomic_t' structure.

That's fine.  But just to ensure the right idea spreads, as people
seem to copy that fix all over the place, the right way to write that
is using `atomic_read', like this:

    if (atomic_read(&tty->count) == 1 && state->count != 1) {

Enjoy,
-- Jamie

Webmaster: Russell Nelson
Last modified: Wed Jul 30 11:02:43 EDT 2003