Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753601AbZKCOcZ (ORCPT ); Tue, 3 Nov 2009 09:32:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753493AbZKCOcW (ORCPT ); Tue, 3 Nov 2009 09:32:22 -0500 Received: from earthlight.etchedpixels.co.uk ([81.2.110.250]:55430 "EHLO bob.linux.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753372AbZKCOcV (ORCPT ); Tue, 3 Nov 2009 09:32:21 -0500 From: Alan Cox Subject: [PATCH 10/11] sdio_uart: Fix the locking on "func" for new code To: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, nico@cam.org Date: Tue, 03 Nov 2009 14:18:58 +0000 Message-ID: <20091103141846.31032.81142.stgit@localhost.localdomain> In-Reply-To: <20091103141525.31032.45206.stgit@localhost.localdomain> References: <20091103141525.31032.45206.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1075 Lines: 36 The new dtr_rts function didn't take the port->func lock as it should so add use of the lock there. Signed-off-by: Alan Cox --- drivers/mmc/card/sdio_uart.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index ebb5d4b..0a3acfb 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c @@ -565,10 +565,14 @@ static void uart_dtr_rts(struct tty_port *tport, int onoff) { struct sdio_uart_port *port = container_of(tport, struct sdio_uart_port, port); + int ret = sdio_uart_claim_func(port); + if (ret) + return; if (onoff == 0) sdio_uart_clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); else sdio_uart_set_mctrl(port, TIOCM_DTR | TIOCM_RTS); + sdio_uart_release_func(port); } /** -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/