From patchwork Thu Feb 25 06:39:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Feng Tang X-Patchwork-Id: 81910 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1P6cCGH009985 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 25 Feb 2010 06:38:48 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NkXMR-0004AA-HH; Thu, 25 Feb 2010 06:38:11 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NkXMP-0004A5-OX for spi-devel-general@lists.sourceforge.net; Thu, 25 Feb 2010 06:38:09 +0000 X-ACL-Warn: Received: from mga11.intel.com ([192.55.52.93]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1NkXMO-0002TV-NJ for spi-devel-general@lists.sourceforge.net; Thu, 25 Feb 2010 06:38:09 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 24 Feb 2010 22:35:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.49,537,1262592000"; d="scan'208";a="543788792" Received: from pgsmsx602.gar.corp.intel.com ([10.221.43.81]) by fmsmga002.fm.intel.com with ESMTP; 24 Feb 2010 22:37:06 -0800 Received: from shzsmsx502.ccr.corp.intel.com (10.239.4.97) by pgsmsx602.gar.corp.intel.com (10.221.43.81) with Microsoft SMTP Server (TLS) id 8.2.176.0; Thu, 25 Feb 2010 14:36:41 +0800 Received: from feng-i7 (10.239.14.181) by shzsmsx502.ccr.corp.intel.com (10.239.4.97) with Microsoft SMTP Server (TLS) id 8.2.176.0; Thu, 25 Feb 2010 14:36:32 +0800 Date: Thu, 25 Feb 2010 14:39:40 +0800 From: Feng Tang To: Andrew Morton Message-ID: <20100225143940.40e21ff7@feng-i7> In-Reply-To: <20100224151832.42c699f2.akpm@linux-foundation.org> References: <20091229222006.1ddb28a4@feng-desktop> <20100208165946.0e4dde83@feng-i7> <20100208162010.b1f69728.akpm@linux-foundation.org> <20100209093644.2dead2d9@feng-i7> <20100217225817.GD31557@kroah.com> <20100224131130.61530b62@feng-i7> <20100224151832.42c699f2.akpm@linux-foundation.org> Organization: intel X-Mailer: Claws Mail 3.7.2 (GTK+ 2.18.3; i486-pc-linux-gnu) MIME-Version: 1.0 X-Spam-Score: -4.0 (----) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -4.0 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [192.55.52.93 listed in list.dnswl.org] X-Headers-End: 1NkXMO-0002TV-NJ Cc: David Brownell , Greg KH , Greg Kroah-Hartman , "linux-serial@vger.kernel.org" , spi-devel-list , "alan@lxorguk.ukuu.org.uk" Subject: Re: [spi-devel-general] [RFC][PATCH v3] serial: spi: add spi-uart driver for Maxim 3110 X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 25 Feb 2010 06:38:49 +0000 (UTC) diff --git a/drivers/serial/max3110.c b/drivers/serial/max3110.c index e8c44fa..d5bd71f 100644 --- a/drivers/serial/max3110.c +++ b/drivers/serial/max3110.c @@ -400,7 +400,7 @@ static int max3110_main_thread(void *_max) do { wait_event_interruptible(*wq, max->flags || kthread_should_stop()); - set_bit(0, &max->mthread_up); + test_and_set_bit(0, &max->mthread_up); if (use_irq && test_bit(M3110_IRQ_PENDING, &max->flags)) { max3110_con_receive(max); @@ -418,7 +418,7 @@ static int max3110_main_thread(void *_max) transmit_char(max); clear_bit(M3110_UART_TX_NEED, &max->flags); } - clear_bit(0, &max->mthread_up); + test_and_clear_bit(0, &max->mthread_up); } while (!kthread_should_stop()); return ret;