Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934668AbZLKXbS (ORCPT ); Fri, 11 Dec 2009 18:31:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934414AbZLKX3q (ORCPT ); Fri, 11 Dec 2009 18:29:46 -0500 Received: from kroah.org ([198.145.64.141]:50535 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934462AbZLKX3f (ORCPT ); Fri, 11 Dec 2009 18:29:35 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Alan Cox , Greg Kroah-Hartman Subject: [PATCH 52/58] tty: moxa: Kill the use of lock_kernel Date: Fri, 11 Dec 2009 15:28:36 -0800 Message-Id: <1260574122-10676-52-git-send-email-gregkh@suse.de> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <20091211232805.GA10652@kroah.com> References: <20091211232805.GA10652@kroah.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2311 Lines: 71 From: Alan Cox It isn't needed here any more Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/char/moxa.c | 16 ++-------------- 1 files changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index ac06d01..d53fac5 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -202,7 +201,6 @@ static int moxa_tiocmset(struct tty_struct *tty, struct file *file, unsigned int set, unsigned int clear); static void moxa_poll(unsigned long); static void moxa_set_tty_param(struct tty_struct *, struct ktermios *); -static void moxa_setup_empty_event(struct tty_struct *); static void moxa_shutdown(struct tty_port *); static int moxa_carrier_raised(struct tty_port *); static void moxa_dtr_rts(struct tty_port *, int); @@ -1251,17 +1249,13 @@ static int moxa_chars_in_buffer(struct tty_struct *tty) struct moxa_port *ch = tty->driver_data; int chars; - lock_kernel(); chars = MoxaPortTxQueue(ch); - if (chars) { + if (chars) /* * Make it possible to wakeup anything waiting for output * in tty_ioctl.c, etc. */ - if (!test_bit(EMPTYWAIT, &ch->statusflags)) - moxa_setup_empty_event(tty); - } - unlock_kernel(); + set_bit(EMPTYWAIT, &ch->statusflags); return chars; } @@ -1503,12 +1497,6 @@ static void moxa_set_tty_param(struct tty_struct *tty, struct ktermios *old_term tty_encode_baud_rate(tty, baud, baud); } -static void moxa_setup_empty_event(struct tty_struct *tty) -{ - struct moxa_port *ch = tty->driver_data; - set_bit(EMPTYWAIT, &ch->statusflags); -} - /***************************************************************************** * Driver level functions: * *****************************************************************************/ -- 1.6.5.5 -- 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/