[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160824232437.9446-4-robh@kernel.org>
Date: Wed, 24 Aug 2016 18:24:33 -0500
From: Rob Herring <robh@...nel.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Marcel Holtmann <marcel@...tmann.org>,
Jiri Slaby <jslaby@...e.com>,
Sebastian Reichel <sre@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
"Dr . H . Nikolaus Schaller" <hns@...delico.com>,
Alan Cox <gnomes@...rguk.ukuu.org.uk>
Cc: Loic Poulain <loic.poulain@...el.com>, Pavel Machek <pavel@....cz>,
Peter Hurley <peter@...leysoftware.com>,
NeilBrown <neil@...wn.name>,
Linus Walleij <linus.walleij@...aro.org>,
linux-bluetooth@...r.kernel.org, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [RFC PATCH 2/6] serio: serport: hacks to get DT probe to work
For DT matching, the serio->dev.parent is expected to be the UART device
which is the tty's parent device. Not sure if this change has any side
effects, but this is all just for testing.
The spinlock causes deadlocks if serio_write is called from interrupt
handler as write_wakeup gets called. This could be fixed by clearing
TTY_DO_WRITE_WAKEUP if the spinlock is locked, but just doing quick hack
for now.
Signed-off-by: Rob Herring <robh@...nel.org>
---
drivers/input/serio/serport.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/input/serio/serport.c b/drivers/input/serio/serport.c
index 9c927d3..a938c2b 100644
--- a/drivers/input/serio/serport.c
+++ b/drivers/input/serio/serport.c
@@ -183,7 +183,7 @@ static ssize_t serport_ldisc_read(struct tty_struct * tty, struct file * file, u
serio->open = serport_serio_open;
serio->close = serport_serio_close;
serio->port_data = serport;
- serio->dev.parent = tty->dev;
+ serio->dev.parent = tty->dev->parent;
serio_register_port(serport->serio);
printk(KERN_INFO "serio: Serial port %s\n", tty_name(tty));
@@ -253,10 +253,10 @@ static void serport_ldisc_write_wakeup(struct tty_struct * tty)
struct serport *serport = (struct serport *) tty->disc_data;
unsigned long flags;
- spin_lock_irqsave(&serport->lock, flags);
+// spin_lock_irqsave(&serport->lock, flags);
if (test_bit(SERPORT_ACTIVE, &serport->flags))
serio_drv_write_wakeup(serport->serio);
- spin_unlock_irqrestore(&serport->lock, flags);
+// spin_unlock_irqrestore(&serport->lock, flags);
}
/*
--
2.9.3
Powered by blists - more mailing lists